From: | Robert A Duff <bobduff@shell01.TheWorld.com> |
Newsgroups: | comp.compilers |
Date: | Fri, 31 Dec 2010 09:05:40 -0500 |
Organization: | The World Public Access UNIX, Brookline, MA |
References: | 10-12-040 10-12-043 |
Keywords: | design |
Posted-Date: | 01 Jan 2011 22:17:17 EST |
George Neuner <gneuner2@comcast.net> writes:
> Personally, I would say add variant records if it isn't too hard and
> won't cause conflict with your intended class implementation. IMO it
> never hurts to give the programmer choices.
I rather strongly disagree with that last sentence. Giving the
programmer more choices means the programmer has more to learn,
and the compiler writer has more work to do. That's a good
idea only if the alternatives are sufficiently useful.
In this case, I don't think it's worth it -- I think it's possible
to design a single language feature that does everything classes
can do, and everything variant records can do. No need for
two completely different features, each with its own syntax
and semantics.
- Bob
[I have to agree. You want a language with lots and lots of choices,
look at PL/I. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.