3 ms·
Are they so vastly different? Other than perhaps Lisp and Elm, they are largely equivalent, with different levels of immutability on top of a largely imperative
by kaba0 5y ago
Are they so vastly different? Other than perhaps Lisp and Elm, they are largely equivalent, with different levels of immutability on top of a largely imperative core.
At least mention prolog, forth, SQL or the like that are truly different.
- k__ 5y agoThey all have distiguishing features that can be emulated in other languages (to a degree) but will throw off even senior developers. Lisp has its macros. Elm has its type system. Go, Elixir, and JS have rather idiosyncratic concurrency models. Rust has its borrow checker. Perl seems to be SO special that even proficient Perl devs aren't able to write performant code in it. /s Sure, Prolog and SQL are much more different than the rest. But I didn't want to strawman here.
- chrismorgan 5y agoRust’s ownership model (which is more than just the borrow checker, it’s the whole concept of one location actually owning data, and aliasing XOR mutability, and the pervading effects of this design on the language and its libraries) is a really big deal, even if it doesn’t look like it would be at a casual glance. It changes how you approach programming and reason about systems, and truly is (or should be used as) a fundamentally different approach to data flow and what’s possible, a smidgeon like Prolog in that way of being different, though not as much. I miss it very frequently when working in other languages (which is mostly JavaScript these days), because there are plenty of things that just become impossible to express reliably without it. Working in another language you can adopt conventions of writing in this style, but you can’t verify it without representing it in the type system, so the result will be riddled with holes in other languages. (It is, however, difficult to disentangle some features that Rust’s ownership model requires but which aren’t necessarily a part of that ownership model: for example, algebraic data types are essential and expression orientation extremely desirable, but there are other languages which have those features without the rest of the ownership model.) People often think memory safety without garbage collection is Rust’s shtick, but it’s actually the ownership model that’s Rust’s defining feature, underpinning everything and making that possible.
- kaba0 5y agoCorrect me if I’m wrong, but Pony lang brings Rust’s ownership model to the max - so as a niche language, do check it out!