|
![](/i/fill.gif) |
On 26/10/2010 02:59 PM, Mike Raiford wrote:
> As they call it, Syntactic sugar.
Depends on your language.
In an object-oriented language, you generally don't need it, since
anything declared to be of class X can actually be of class X *or* any
subclass thereof.
In Haskell, "unions" are a fundamental part of the language. One of the
fundamental branching primitives is based on them. Nullable fields use
unions, lists are unions, trees are unions, just about everything ends
up being a union. [Insert witty Thatcher jokes here.]
Post a reply to this message
|
![](/i/fill.gif) |