3 ms·
I would consider whether people like writing it to be a virtue, so I would argue that the widespread love for Rust is, in fact, an example of a language thrivin
by tialaramex 4y ago
I would consider whether people like writing it to be a virtue, so I would argue that the widespread love for Rust is, in fact, an example of a language thriving on virtue.
I have learned a great many languages (and forgotten some of them, a while back I was prompted to re-discover that last century I wrote a bunch of Scheme, my name is on the work and the timeline checks out but I don't remember it) over my lifetime. Rust is the first language where I want to go back and rewrite stuff in Rust because of how nice it is.
- still_grokking 4y agoI'm a Scala fan. (Maybe this shows :-)). But I'm also quite excited by Rust lately. But coming from Scala my feeling is constantly: Rust is missing so much still! I would really like a language more like Scala but with the performance of Rust. Of course other people get very excited when using Rust because for many this is the first proper language they've ever encountered. But I'm quite unimpressed in general regarding "hyped" Rust features. I had immutable values, HOFs, ADTs, type-classes, pattern matching with exhaustivity checks, macros, and all that "since forever". But I miss HKTs, implicits, proper macros, and some other things in Rust. It will take at least a decade for Rust to catch up. But than Scala will be even farther away… But OK, at least one can say that the ML family of languages is finally succeeding. (Scala and Rust are both descendants of ML).
- tialaramex 4y agoSure, lots of things would be nice to have in Rust that aren't done yet. Some of them you can see in nightly, because their rough shape exists but isn't stabilised. Rust is taking things rather steady because of a strong preference for soundness. In particular I want a stable niche (my nook crate uses the unstable niches because that's the only way to do it, the intent is to use a stabilised mechanism when one exists), I want a stable way to write const implementations of traits which aren't necessarily const (and thus const for loops) and on the same lines I want const panic. A strong macro system is very dangerous. I use and like Rust's declarative ("By example") macros, and I appreciate the need for proc macros or other technology but it's very dangerous. Are Scala's macros somehow less dangerous? Or you just prefer how they work? Rust has come a pretty long way since 1.0. Once upon a time u8::MAX couldn't exist. There was no way to express the idea that a type has an associated constant, so that's why std::u8::MAX is (deprecated but) there. It's probably never going to be as comfortable to write Rust as Scala, but on the other hand it's definitely never going to be possible to deliver the performance of Rust in Scala.
- Ygg2 4y agoAs someone that had to dabble in Scala. Most of stuff Scala has fill me with dread. "proper macro", implicits, custom operator overloading, etc. Are extremely powerful concepts. Too powerful if you ask me. They tend to make code utterly unreadable (without an IDE). Why is `int` a `Date`? Don't know. Use an IDE. What does the ~%+# operator does? ¯\_(ツ)_/¯ [2] But I'm a bit conservative in language syntax. I'm against async and its in most languages already (it makes debugging more convoluted). [1]https://lprakashv.medium.com/how-to-keep-your-sanity-working-with-scala-implicit-fda9ffc33162 https://lprakashv.medium.com/how-to-keep-your-sanity-working... [2]http://www.scala-graph.org/guides/core-initializing.html http://www.scala-graph.org/guides/core-initializing.html
- still_grokking 4y agoHave you actually read what you've linked? From [1]: > While this can be really disheartening, this is not enough of a reason to move away from an amazing programming language, just because of a really abused feature! Please also note: The blog post talks only about implicit conversions. That's actually the most uninteresting part of implicits. (Watch the video there to learn what implicits are actually for). Also the post is about the old version of Scala. Implicits got redesigned in Scala 3. They're not even called implicits any more. https://docs.scala-lang.org/scala3/reference/contextual/index.html https://docs.scala-lang.org/scala3/reference/contextual/inde... All problems mentioned in the blog post are solved. For example you can't import `given`s (like implicit definitions are called now) by accident. You need to do this explicitly. They got removed form the normal import scope. Implicit conversions are btw. now heavily guarded, with very explicit declarations in form of a type-class instance & lang imports, besides the other changes that make application much safer so less surprises possible: https://docs.scala-lang.org/scala3/reference/changed-features/implicit-conversions-spec.html https://docs.scala-lang.org/scala3/reference/changed-feature... But anyway, everybody know since years that you should not overuse them. Also other languages like C# have this feature (and I'm not even talking about dynamic languages where this is the "normal" way everything works without safe guards by a static type system). Nobody ever complained about C# in this regard. Besides that: The Rust people are looking envious. I've read about some ideas that were more or less a direct copy of Scala's implicits. And I'm quite sure, if Rust would introduce something like that most people would love it! Because it would solve some issues in Rust, and would also allow to remove complex boilerplate code. Than, [2] is a pure obscurity. Never heard of. But even the "WTF-operators" defined in this library look very strange (this is not usual Scala code!) I would not know without lookup what a `WLkUnDiEdge` is, even when spelled out… And to stress it once more: This external lib is not part of Scala. Something like that wouldn't be ever accepted into the std. lib! The BDFL wants to even remove unrestricted operator syntax. But I hope this does not happen as it would only make the language more complex for no gain. Someone who defines a `~%+#` operator would likely still do it even when you would have to write it as ` ~%+# `. So nothing won. [The operator method is written without the spaces around the back-ticks of course. But this does not render well here] > Too powerful if you ask me. If you don't like powerful languages with modern features I guess Rust is also not for you.