Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
cobby
· 3y ago · 0 comments
Also Nim requires you to use unique field names across all variants.
Comments
[–]
alwaysbeconsing
3y ago
This annoying restriction is lifted in Nim 2; see the linked announcement.
[–]
xigoi
3y ago
Where in the announcement does it say that?
[–]
ElegantBeef
3y ago
They likely read "overloadable enums" and went "Oh Rust calls their tagged unions enums" so assumed all languages did.
[–]
alwaysbeconsing
3y ago
Oh, no, I actually misunderstood cobby's complaint: the field names, yes, those still have to be unique. Which is also a bit annoying, though I've seen discussions about changing it.