Herd
Languages and libraries
programming language
SHOW HN2026
How HN took it
3 positive, 21 neutral or asking, 1 mixed, 5 critical, out of 30 comments about the project. Thread score -0.07.
Idea: 2 for, 3 againstDesign: 1 for, 2 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Value semantics with copy-on-write gives data-race immunity without locks
From 1 comment
The threading story here is what grabbed my attention. Pass-by-value with copy-on-write means you get data-race immunity without any locks or channels. You just pass data to a…
augusteo on HN
The pipe-equal operator is neat
From 1 comment
the pipe-equal operator is pretty neat, don't think I've seen any other language do that.
zem on HN
Objections
Pass-by-value is misleading since it is implemented by reference counting
From 2 comments
Hmm this is a bit like peeling a banana only to throw the banana and eat the peel. Pass by value reduces the true benefit of copy-on-write. Use immutable pass by reference. Make…
sheepscreek on HNPass-by-value is already a copy.
jagged-chisel on HN
Atomic reference counting carries a performance cost
From 1 comment
> Use immutable pass by reference. Make a copy only if mutability is requested in the thread. This is essentially what Herd does. It's only semantically a pass by value, but the…
jcparkyn on HN
Hard to thread state through programs and build custom data structures without references
From 1 comment
My hobby language[1] also has no reference semantics, very similar to Herd. I think this is a really interesting point in the design space. A lot of complexity goes away when…
electroly on HN
Requests
Benchmark real workloads for copy-on-write performance
From 1 comment
The threading story here is what grabbed my attention. Pass-by-value with copy-on-write means you get data-race immunity without any locks or channels. You just pass data to a…
augusteo on HN
Use persistent immutable data structures
From 2 comments
My hobby language[1] also has no reference semantics, very similar to Herd. I think this is a really interesting point in the design space. A lot of complexity goes away when…
electroly on HNNobody has heard of persistent data structures?!
anacrolix on HN
Questions
How mutable references or passing mutation into functions work
From 1 comment
But what if mutation is intended? How to pass a mutable reference into a function, so that it can change the underlying value and the caller can observe these changes? What about…
Panzerschrek on HN
Whether everything being a value is possible given reduction
From 1 comment
At the risk of telling you what you already know and/or did not mean to say: not everything can be a value. If everything is a value then no computation (reduction) is possible.…
discarded1023 on HN
Alternatives named
Euphoria
From 1 comment
(Edit: in the old post title:) "everything is a value" is not very informative. That's true of most languages nowadays. Maybe "exclusively call-by-value" or "without reference…
ekipan on HN
Standard ML
From 1 comment
At the risk of telling you what you already know and/or did not mean to say: not everything can be a value. If everything is a value then no computation (reduction) is possible.…
discarded1023 on HN
Haskell
From 1 comment
This sounds quite similar to pure functional languages like Haskell, where a function call cannot have any side effect. But those go further in that they don't even have any…
tromp on HN
Nim
From 1 comment
Nim has a similar, strong preference for value semantics. However, its dynamic heap types (strings, seqs, tables) are all implemented as wrappers that hide the internal…
netbioserror on HN
Swift
From 1 comment
Swift actually does this copy-on-mutation strategy as well for its standard library’s container types like Array and Dictionary, and it does indeed make multithreaded programming…
MetricExpansion on HN