From: Stephan Heinemann <zombie@cs.tu-berlin.de>
Subject: Re: automatic tag conversion?
Date: 23 May 2003 23:57:49 GMT
Date: 2003-05-23T23:57:49+00:00 [thread overview]
Message-ID: <bamcht$fs8$1@news.cs.tu-berlin.de> (raw)
In-Reply-To: bam9ec$asg$1@news.cs.tu-berlin.de
Stephan Heinemann <zombie@cs.tu-berlin.de> wrote:
> t: Tag;
> subvar: Subtype;
> ...
> t := supervar'Tag;
> subvar := t'convert(supervar); -- convert(t, supervar)
> polymorphic(subvar);
Of course I don't know what the concrete Subtype is and I don't wanna
know. Therefore the code snippet is wrong. I meant:
polymorphic(t'convert(supervar))
or better and safer (because t may describe a Type not within Supertype)
polymorphic(supervar'TagType)
It is not my lazyness, but I'd like to extend my code without updating
conditionals on Strings. For every new Subtype of Supertype I not only
need to overload the polymorphic procedure but also a String comparation.
Thanks,
Stephan
next prev parent reply other threads:[~2003-05-23 23:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-23 23:04 automatic tag conversion? Stephan Heinemann
2003-05-23 23:57 ` Stephan Heinemann [this message]
2003-05-24 17:39 ` Georg Bauhaus
2003-05-25 20:59 ` Stephan Heinemann
2003-05-26 8:29 ` Dmitry A. Kazakov
2003-05-26 18:16 ` Georg Bauhaus
2003-05-26 18:27 ` Georg Bauhaus
2003-05-26 20:49 ` Stephan Heinemann
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox