From: | noitalmost <noitalmost@cox.net> |
Newsgroups: | comp.compilers |
Date: | Fri, 31 Dec 2010 17:02:23 -0500 |
Organization: | Compilers Central |
References: | 10-12-040 10-12-052 10-12-064 |
Keywords: | design, storage |
Posted-Date: | 01 Jan 2011 22:18:21 EST |
On Thursday, December 30, 2010 04:06:08 pm George Neuner wrote:
> It isn't always possible to know statically which alternation is
> active ... but it is possible to make certain the code covers all
For now, I'm not going to include variant records in my language, but I'm
going to try to keep my options open for later. So I guess I'd like an example
of where it would be nice to have a variant record. So, assuming our language
is C++ (so we eliminate cases in C where a union is used only because we don't
have inheritance), can someone give me a system progamming example that
requires a union? I'm still looking for that "aha!" moment of its usefulness
if the language has classes.
Also, is alternation the general term for this type of construct, or is that
just the way one says union in ML?
Return to the
comp.compilers page.
Search the
comp.compilers archives again.