So I have a "how do I use this idiomatically" sort of question...

In ML/Haskell and friends, there is no syntactically simple way to say "all
legs of this union have the following fields in common". You either build a
structure with the common fields and mention it explicitly in every leg of
the union, or (conversely) you make the union an element of a larger
structure.

AST nodes are a use case. They tend to have a large number of common
metadata fields (position, type, auxiliary marker bits of various sorts...)
and a small variant part describing the children of the node.

Is there a common idiom that people use in cases like this?


Jonathan
_______________________________________________
bitc-dev mailing list
bitc-dev@coyotos.org
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to