5 ms·
Anyone interested in what an immutable programming language looks like should check out Unison [0] written by Paul Chiasano. He is known for writing the book FP
by JackMorgan 5y ago
Anyone interested in what an immutable programming language looks like should check out Unison [0] written by Paul Chiasano. He is known for writing the book FP in Scala.
The premise is that any edit produces a new function, but the old one still exists, so you need to migrate calls from the old version to the new version.
The benefits really start to manifest in distributed computing and package management: much less need to worry about transitive dependencies and conflicting versions.
The editable code is a projection of a data structure, so refactoring and static analysis tools will be very easy to write. Also the syntax is just a display issue and can be changed easily, everyone could read and write code in the syntax they prefer.
It does increase some complexity, but I think it is essential complexity we currently have only poor ways to manage, and explicit knobs to turn will allow us overall less effort.
[0]https://www.unisonweb.org/ https://www.unisonweb.org/
- fsloth 5y agoF# is immutable by default, so are all ML variants (e.g. OCaml, Scala) for that matter.
- DennisP 5y agoF# has immutable data by default. Your parent comment describes immutable code.
- CyberDildonics 5y agoWhat is that supposed to mean?
- DennisP 5y agoI mean, it's right there in the above comment with presumably more at the link. This seems like the key point: > any edit produces a new function, but the old one still exists, so you need to migrate calls from the old version to the new version I'm not the guy to expand on it further, but maybe the above commenter could answer questions.
- CyberDildonics 5y agoA running program "editing" its functions is already pretty exotic and mostly relegated to JIT compilation.
- DennisP 5y agoI think they're talking about software development, not running functions.
- CyberDildonics 5y agoI don't understand why this would need a new language, it seems like tools would be easier. If it is from development, the whole point is to edit functions. If it is to edit live programs, one obvious and good way is to swap out a function pointer atomically and call functions by getting their pointer atomically. This doesn't really have anything to do with a different language though.
- DennisP 5y ago> The benefits really start to manifest in distributed computing and package management: much less need to worry about transitive dependencies and conflicting versions. I can see how that would work better if function references are to hashes of entire functions, rather than just the names of functions.