Re:The Idea of Lisp
by killercup on Friday December 16, 2016 @11:43AM
(#13194508)
The empty tuple/unit is not the same as void. It has exactly one possible value, void has zero possible values. A way to write it in Rust is `enum Void {}` (an enumeration with no options).
[ Parent
| on HN ]
Re:The Idea of Lisp
by virtualwhys on Friday December 16, 2016 @01:35PM
(#13195528)
The point is that both void and Unit can only produce a side effect. In everything-is-an-expression based languages Unit is exactly equivalent to void in C*.