Re: language design implications for variant records in a pascal-like language

noitalmost <noitalmost@cox.net>
Fri, 31 Dec 2010 17:02:23 -0500

          From comp.compilers

Related articles
[15 earlier articles]
Re: language design implications for variant records in a pascal-like gneuner2@comcast.net (George Neuner) (2010-12-30)
Re: language design implications for variant records in a pascal-like gneuner2@comcast.net (George Neuner) (2010-12-30)
Re: language design implications for variant records in a pascal-like gneuner2@comcast.net (George Neuner) (2010-12-30)
Re: language design implications for variant records in a pascal-like bobduff@shell01.TheWorld.com (Robert A Duff) (2010-12-31)
Re: language design implications for variant records in a pascal-like bobduff@shell01.TheWorld.com (Robert A Duff) (2010-12-31)
Re: language design implications for variant records in a pascal-like fw@deneb.enyo.de (Florian Weimer) (2010-12-31)
Re: language design implications for variant records in a pascal-like noitalmost@cox.net (noitalmost) (2010-12-31)
Re: language design implications for variant records in a pascal-like gah@ugcs.caltech.edu (glen herrmannsfeldt) (2011-01-02)
Re: language design implications for variant records in a pascal-like gene.ressler@gmail.com (Gene) (2011-01-02)
Re: language design implications for variant records in a pascal-like torbenm@diku.dk (2011-01-04)
Re: language design implications for variant records in a pascal-like jm@bourguet.org (Jean-Marc Bourguet) (2011-01-05)
Re: language design implications for variant records in a pascal-like gneuner2@comcast.net (George Neuner) (2011-01-06)
Re: language design implications for variant records in a pascal-like gneuner2@comcast.net (George Neuner) (2011-01-06)
[34 later articles]
| List of all articles for this month |

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?



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.