Hacker News new | past | comments | ask | show | jobs | submit login

Scala is like Rust and Rust is like Scala. They are proud of their complexity.



I 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.


Meh 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.


If 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.


Can we all just get along and agree that at least none of them are Javascript?


I 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/b4fcbd0c25870941af7...


We acknowledge that sometimes complexity is necessary, but that doesn't mean that we don't try to reduce it wherever possible.


What are the points which in your opinion make Scala complex?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: