3 ms·
Not entirely nonsense—immutability is helpful even in the absence of referential transparency—but still, a “pure” keyword would be great. Now, what I’d really l
by evincarofautumn 15y ago
Not entirely nonsense—immutability is helpful even in the absence of referential transparency—but still, a “pure” keyword would be great. Now, what I’d really like is for the type system to be flipped on its head with respect to immutability: make “const” the default and explicitly qualify mutable types with “mutable”. A guy can dream…
- kibwen 15y agoPerhaps you should take a look at Rust.[1] It's a pretty compelling union of functional and procedural paradigms, plus: immutability by default, the ability to annotate functions as pure, pattern matching, option types, good C compatibility, strong support for concurrency, high-level memory management that guarantees memory safety and that doesn't require tedious memory micromanagement (while retaining the option to just GC everything and forget about it), and a lot more. Still alpha software at the moment, though. [1] http://www.rust-lang.org/ http://www.rust-lang.org/
- evincarofautumn 15y agoI’ve looked into it. Seems like a promising language, and it does quite a few things right. Still, I feel a bit uncomfortable endorsing it wholesale while I work on my own linguistic magnum opus. ;)
- zem 15y agoyeah, i'm excited about rust. i'm currently diving into d, and while it is a lot nicer than c++ (and i've barely started discovering all its features), i really miss pattern matching, option types and everything-is-an-expression, which i've gotten used to from other languages. it looks like rust supports all three of those features, which already puts it closer to my sweet spot.