Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/



F# is immutable by default, so are all ML variants (e.g. OCaml, Scala) for that matter.


F# has immutable data by default. Your parent comment describes immutable code.


What is that supposed to mean?


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


A running program "editing" its functions is already pretty exotic and mostly relegated to JIT compilation.


I think they're talking about software development, not running functions.


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


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




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: