by Night_Thastus · 3y ago · 0 comments
Default immutability is great in a language like Rust where it's designed from the ground up to warn you as much as possible at compilation when something is wrong. You can rely on the compiler a lot. But adding default immutability to a language that isn't designed around the same concepts seems odd. You don't gain the same kind of benefits, but you do have to deal with the tedium. Worst of both worlds, in my view.
There are some examples of languages that have a nice blend of functional features built in that are not fully functional languages, and the developer experience is fantastic (e.g. C#, Typescript, Kotlin, Swift, Java 11+)
They could've improved the developer experience, but they made some kind of C+- with easier concurrency.
And I find it all sad because Go ticks many of my boxes for a "perfect" general-purpose programming language.
Pretty sure by ADTs, GP means "algebraic data types". These are very much functional, at least in the sense that they're a standard feature of statically typed FP (at least I know of no such language that doesn't have them).
ADT also sometimes stands for "abstract data type", which is something different. Although I wouldn't call them incompatible with FP either, Haskell typeclasses can express abstract data types, for example.
Yeah, then if they want algebraics then a functional language is definitely the answer here.