ISV_Damocles
Joined 14 years ago
Joined 14 years ago
UTF-32 would be a fair comparison, but it is 4 bytes per character and I don't know what, if anything, uses it.
And the flippant response from the parent here that they don't really care that they're muddying the waters and just want the crate name is irksome.
Netflix and Disney+ trained me to not even watch a show until it's concluded because it could get cancelled and I don't want to invest my small amount of free time on entertainment that might not even finish. It does produce a self-fulfilling prophecy where people with the same mindset as me on this do the same, and then the rating for something I (and probably they) are interested in aren't high enough and it gets cancelled.
What should worry them, though, is that it also led to the final step for them; I cancelled my Netflix and Disney+ subscriptions with no intention of renewing them around a year ago. The end result is that "TV series"-style shows are effectively dead to me; I've shifted my time on them mostly to novels (that are basically behind-the-curve on this trend, hopefully forever), followed by single-player video games, and finally movies. (Why didn't movies take the first slot? Because I'm only willing/able to give 30-60 minutes of continuous time to entertainment most of the time, and it's very unsatisfying to pause a movie to resume later.)
The continuous, immediate feedback on series performance coupled with a reputation of acting on that feedback immediately is killing the traditional television medium.
On top of all of that, Apple TV+ has the added albatross of requiring their hardware for the shows, as if they were somehow a siren song to get people more tightly nestled into their ecosystem, and therefore dooming their shows to failure, at least amongst people who don't want to pay for overpriced hardware running software of degrading quality over the years (I switched to Linux in 2016 because it was more reliable than my MacBook Air; being better than Windows isn't good enough anymore, especially when Linux has a greater catalog of software these days).
The needs of Apple, Inc weigh on their Apple TV division, they don't help it, and the sins of the streaming services against actually finishing a story further increase the trust deficit with Apple TV+. No amount of marketing is going to turn that around.
Btw, Python also has unsafe APIs[1, 2, 3, 4] so this doesn't even differentiate these two languages from each other. Some of them are directly related to memory safety, and you don't even get an `unsafe` block to warn you to tread lightly while you're using them. Perhaps we should elevate Rust above Java and Python because of that?
[1]: https://docs.python.org/3/library/gc.html#gc.get_referrers
[2]: https://docs.python.org/3/library/ctypes.html
You can absolutely opt-out of lifetime management in Rust. It's not usually talked about because you sacrifice performance to do it and many in the Rust community want to explicitly push Rust in the niches that C and C++ currently occupy, so to be competitive the developer does have to worry about lifetimes.
But that has absolutely nothing to do with Rust's safety, and the fact that Rust refuses to compile if you don't provide it a proper solution there means it's at least as safe as Python and Java on the memory front (really, it is more as I have already stated). Just because it's more annoying to write doesn't affect it's safety; they are orthogonal dimensions to measure a language by.
Rust won't let you do the wrong thing here (except if you explicitly opt-in to with `unsafe` as you note is also possible in other languages). The Rust compiler, when writing normal Rust code will prevent you from compiling code that uses memory incorrectly.
You can then solve the problem by figuring out how you're using the memory incorrectly, or you could just skip out on it by calling `.clone()` all over the place or wrapping your value in `Rc<T>` if it's for single-threaded code, or `Arc<Mutex<T>>` for multi-threaded code, and have it effectively garbage-collected for you.
In any case, this is orthogonal to safety. Rust gives you better safety than Python and Java, but at the cost of a more complex language in order to also give you the option of high performance. If you just want safety and easy memory management, you could use one of the ML variants for that.
Much harder to write Rust than Python, but definitely safer.
(Rust vs Java is much closer, but Java's nullable types by default and errors that are `throw`n not needing to be part of the signature of the function lead to runtime errors that Rust doesn't have, as well.)
[1]: https://www.tomshardware.com/reviews/cpu-hierarchy,4312.html...
...why do I feel nostalgic for a cyberpunk dystopia?
Production is not some place you're supposed to cowboy code, but instead have a reasonable expectation that you will be able to continue supporting it for as many years as it operates, and it's impossible for anyone to responsibly use technology with known limitations that have bitten other real engineering teams that they can find zero workarounds for.
If you don't consider that an impossibility for a production environment, then I certainly wouldn't want to work with you on a team with production responsibilities.
Elm's value proposition is mostly being a functional language with an opinionated MVU library baked in, so you can reproduce that value with a better functional language and selecting a similar MVU library in that other language, which means it should never actually cross the value bar above the risk it brings if you need a browser feature it doesn't support and actively prevents you from accessing.
Then nVidia's moat begins to shrink because they need to offer their GPUs at a somewhat reduced price to try to keep their majority share.