News for hackers. Stuff that matters.
Re:Sum Types Are Coming (2015) by taneq on Friday February 16, 2018 @12:57AM (#16390241)
Do we really need a new name for this? It's basically "safe C-style unions", but pretty much everything in C is unsafe, so you might as well just call it "unions".
Re:Sum Types Are Coming (2015) by saurik on Friday February 16, 2018 @01:05AM (#16390272)
This is not a new name... in the theory of algebraic data types there is a model of what it means to add and multiply types, resulting in "sum" and "product" types. I am not 100% sure but I believe these terms have been used since the early 70s.

The term "union" as used in C is highly related but not quite the same. If you add a tag to the union (and so have a "tagged union", often represented in C as a struct with an enum and a union) then you are equivalent in an information sense (but the usage is still different, as a C union says something very specific about how memory is used).

Re:Sum Types Are Coming (2015) by Taniwha on Friday February 16, 2018 @05:27AM (#16391348)
as mentioned elsewhere 'union' originally came from Algol68 where (eventually) they were implemented exactly as described in the article
Re:Sum Types Are Coming (2015) by Fufjeudndh on Friday February 16, 2018 @12:59AM (#16390250)
It's not a new name, just one you're unfamiliar with.
Re:Sum Types Are Coming (2015) by nixpulvis on Friday February 16, 2018 @01:14AM (#16390312)
Names are evil, abolish yourself of all naming and achieve true enlightenment!
Re:Sum Types Are Coming (2015) by dang on Friday February 16, 2018 @01:46AM (#16390413)
Could you please stop posting unsubstantive comments to Hacker News?

https://news.ycombinator.com/newsguidelines.html

Re:Sum Types Are Coming (2015) by nixpulvis on Friday February 16, 2018 @01:49AM (#16390426)
I wouldn't exactly call this unsubstantive... though maybe it was a bit aggressive towards the OP.