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

Daniel Zazula <danielzazula@gmail.com>
Fri, 24 Dec 2010 03:01:10 -0800 (PST)

          From comp.compilers

Related articles
language design implications for variant records in a pascal-like lang noitalmost@cox.net (noitalmost) (2010-12-22)
Re: language design implications for variant records in a pascal-like gneuner2@comcast.net (George Neuner) (2010-12-23)
Re: language design implications for variant records in a pascal-like danielzazula@gmail.com (Daniel Zazula) (2010-12-24)
Re: language design implications for variant records in a pascal-like bobduff@shell01.TheWorld.com (Robert A Duff) (2010-12-24)
Re: language design implications for variant records in a pascal-like mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2010-12-25)
Re: language design implications for variant records in a pascal-like DrDiettrich1@aol.com (Hans-Peter Diettrich) (2010-12-25)
Re: language design implications for variant records in a pascal-like gene.ressler@gmail.com (Gene) (2010-12-27)
Re: language design implications for variant records in a pascal-like bobduff@shell01.TheWorld.com (Robert A Duff) (2010-12-27)
Re: language design implications for variant records in a pascal-like noitalmost@cox.net (noitalmost) (2010-12-27)
[53 later articles]
| List of all articles for this month |

From: Daniel Zazula <danielzazula@gmail.com>
Newsgroups: comp.compilers
Date: Fri, 24 Dec 2010 03:01:10 -0800 (PST)
Organization: Compilers Central
References: 10-12-040
Keywords: design, storage
Posted-Date: 25 Dec 2010 16:26:13 EST

> My question is this: Would variant records provide significant value to a user
> of my language (given that classes were implemented)?


> So if
> I'm trying to keep my language (and compiler) fairly small, is there a good
> case for variant records, or could everything be handled through classes
> without too much inconvenience to the user programmer?


IMHO classes are just an evolution of records, properties are fields,
in heavily OO languages like Java and C# all classes including simple
types like integer and string (boxed as objects) descend from a primal
object in such case a variant record is not needed because you can
declare a property of that primal object that it will accept any data
type in the language.


Best Regards
Daniel Zazula



Post a followup to this message

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