Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
theseoafs
· 9y ago · 0 comments
`void` in C does not have a value. You can't make a variable and put a void in it because there is no such object as "void".
Comments
[–]
Ericson2314
9y ago
That is an artificial restriction if C. Also see how ! In Rust is also loosing it's artificial restrictions.
[–]
lomnakkus
9y ago
Indeed, and there has been some talk of removing this restriction in C++ because it makes certain kinds of metaprogramming a lot more cumbersome than they should be.
[–]
jimktrains2
9y ago
Yes, and () isn't void; the poster above me is wrong. Void is...the absence of a type? It's awkward.
However, () and Unit are.