News for hackers. Stuff that matters.
Re:Negative Two-Thousand Lines of Code by nico on Wednesday June 25, 2025 @10:21PM (#44383681)
Immutable functions! I guess that’s one way of doing functional programming /s
Re:Negative Two-Thousand Lines of Code by Sharlin on Thursday June 26, 2025 @04:20AM (#44385324)
In a (very real) sense, git is an immutable data structure of immutable snapshots of code.
Re:Negative Two-Thousand Lines of Code by ThunderSizzle on Thursday June 26, 2025 @12:32PM (#44388947)
You 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.
Re:Negative Two-Thousand Lines of Code by Sharlin on Friday June 27, 2025 @08:36AM (#44396322)
Yes, 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.
Re:Negative Two-Thousand Lines of Code by windward on Thursday June 26, 2025 @06:27AM (#44385971)
pfft, that's just symbol versioning
Re:Negative Two-Thousand Lines of Code by kevincox on Friday June 27, 2025 @03:32PM (#44399584)