3 ms·
Immutable functions! I guess that’s one way of doing functional programming /s
by nico 1y ago
Immutable functions! I guess that’s one way of doing functional programming /s
- Sharlin 1y agoIn a (very real) sense, git is an immutable data structure of immutable snapshots of code.
- ThunderSizzle 1y agoYou can do commit squashing in git, right? I know HG history editing wa much more of a pain than it seems to be in git.
- Sharlin 1y agoYes, but it just creates a new immutable branch in the commit graph. All the old commits are still there, but if they're not reachable from the root refs, they'll get GC'd eventually. The only mutable parts are HEAD, branch/tag names etc that can be changed to point to whatever. Anything that has a hash is necessarily immutable, because changing it in any way (including changing its parent pointer(s)) changes the hash.
- windward 1y agopfft, that's just symbol versioning
- kevincox 1y agoReminds me of https://www.unison-lang.org/docs/the-big-idea/ https://www.unison-lang.org/docs/the-big-idea/