41 ms·
Scala is like Rust and Rust is like Scala. They are proud of their complexity.
by peeyek 8y ago
Scala is like Rust and Rust is like Scala. They are proud of their complexity.
- paulddraper 8y agoIf there's one thing better than a Scala vs Kotlin flamewar or a Rust vs Go flamewar, it's undoubtedly a mashup of the two.
- rcaught 8y agoCan we all just get along and agree that at least none of them are Javascript?
- owl57 8y agoI believe a big part of the famous Javascript semantics can be emulated in Scala with a library. Once upon a time I wrote a toy Android app with Scaloid, and tried to use some on-device print-debugging. toast("foo") worked just fine. toast(42) crashed at runtime. Turns out Scaloid offers an implicit conversion from Int to CharSequence, and it even doesn't turn 42 into anything like "42". I'm not kidding [1]. In Android you normally have "resource identifiers" as integers with no compile-time type information, and then at runtime you never use these as actual numbers, instead you every single time pass them to some function like getText or getDrawable. Sound like the perfect case for implicit conversion, right? [1] https://github.com/pocorall/scaloid/blob/b4fcbd0c25870941af727b382cee500600b7594e/scaloid-common/src/main/scala/org/scaloid/common/implicits.scala#L56 https://github.com/pocorall/scaloid/blob/b4fcbd0c25870941af7...
- masklinn 8y agoI commonly see this assertion but it never made much sense to me: Rust is not that complex, and it's certainly nowhere near the complexity of Scala or C++ let alone worse (to me the sole topic of C++ constructors & assignment feels more complex than the entirety of Rust). What it is is highly front-loaded, especially through the early learning cliff of integrating the borrow checker.
- joshlemer 8y agoMeh I would say Rust is just as complex as Scala. I actually don't think Scala is all that complex, it has few features, they're just write powerful and general ones which take some getting used to I think.
- oalessandr 8y agoWhat are the points which in your opinion make Scala complex?
- steveklabnik 8y agoWe acknowledge that sometimes complexity is necessary, but that doesn't mean that we don't try to reduce it wherever possible.