Mon, 24 Jul 2000 09:04:58 +0100, Chris Angus <[EMAIL PROTECTED]> pisze:

> i.e. rather than having a read / show method for each type
> we have a generic one which "asks" the type which type it
> actually is or requests a constructor by name.

Ugh, IMHO it's bad. Such operations should be overridable for
particular classes. It breaks abstract types. It throws away static
check that a type can be shown. It forces to have runtime type
information for all objects. It requires special cases for various
primitive types like arrays. It's not compatible with current and
future extensions to the language (like existential and universal
quantification).

I would generally avoid reflection in a statically typed language.

-- 
 __("<  Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/            GCS/M d- s+:-- a23 C+++$ UL++>++++$ P+++ L++>++++$ E-
  ^^                W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK                5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-


Reply via email to