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
Return to the
comp.compilers page.
Search the
comp.compilers archives again.