From: | Hans-Peter Diettrich <DrDiettrich1@aol.com> |
Newsgroups: | comp.compilers |
Date: | Sat, 25 Dec 2010 16:19:02 +0100 |
Organization: | Compilers Central |
References: | 10-12-040 |
Keywords: | storage, design |
Posted-Date: | 27 Dec 2010 10:59:24 EST |
noitalmost schrieb:
> 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?
Variant records can simplify memory management of polymorphic data,
eliminating additional class instances (=heap objects) when embedded in
other objects, and can reduce the number of new/additional objects
during type conversions. External libraries (databases, COM) can use
polymorphic records as arguments, so that such a feature may be a MUST
for using such APIs. Otherwise every programmer should be happy with
more type-safe polymorphic classes.
DoDi
Return to the
comp.compilers page.
Search the
comp.compilers archives again.