From: "Hibou57 (Yannick Duchêne)" <yannick_duchene@yahoo.fr>
Subject: Re: Type of the target of an assignment shall not be abstract
Date: Mon, 15 Feb 2010 20:00:41 +0100
Date: 2010-02-15T20:00:41+01:00 [thread overview]
Message-ID: <op.u76m3fxfvwnd5a@garhos> (raw)
In-Reply-To: 39f56354-a2e2-4133-bbad-9343b2f22119@k6g2000prg.googlegroups.com
Le Mon, 15 Feb 2010 18:05:09 +0100, Adam Beneschan <adam@irvine.com> a
écrit:
>
> This is indeed illegal, although offhand I'm not sure it should be.
You cannot create an instance of an abstract type, initialized or not, so
assignment is unlikely to be legal. Whatever it is of instantiation or
assignment, this would not make no sense with an abstract type, as some
method would not be defined. Well, to be honest, one alternative could
have been to allow such a thing and simply disallow invocation of abstract
methods (Borland Turbo Pascal did this), but then, what about if the
object is passed as a class-wide parameter ? The method receiving the it
as a class-wide parameter may access an abstract method. Allowing
instantiation of abstracts and disallowing to pass it where class-wide is
expected, would not have been clean.
--
No-no, this isn't an oops ...or I hope (TM) - Don't blame me... I'm just
not lucky
next prev parent reply other threads:[~2010-02-15 19:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-14 14:20 Type of the target of an assignment shall not be abstract Gautier write-only
2010-02-14 17:57 ` Dmitry A. Kazakov
2010-02-15 17:05 ` Adam Beneschan
2010-02-15 19:00 ` Hibou57 (Yannick Duchêne) [this message]
2010-02-23 21:19 ` Robert A Duff
2010-02-16 0:59 ` Adam Beneschan
2010-02-16 10:03 ` Gautier write-only
2010-02-16 12:14 ` Gautier write-only
2010-02-16 16:12 ` Adam Beneschan
2010-02-28 17:00 ` Gautier write-only
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox