From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: generics and records
Date: Tue, 1 Mar 2005 21:17:28 +0100
Date: 2005-03-01T21:17:25+01:00 [thread overview]
Message-ID: <5kzckz5ti4d5$.ebgeski556b7.dlg@40tude.net> (raw)
In-Reply-To: 4224c698$0$24941$9b4e6d93@newsread2.arcor-online.net
On Tue, 01 Mar 2005 20:47:24 +0100, Georg Bauhaus wrote:
> Martin Krischik wrote:
>
>>>generic
>>> type x is private;
>>
>> You need a common ancestor class for this construct to work:
>>
>> type x is new y with private;
>>
>>
>>>package ...
>>>private
>>> type xx is new x;
>>>end ...
>
> Yes and no.
Rather no than yes. The following is illegal:
generic
type X is new Baz with private;
package Foo is
type XX is new X;
end Foo;
For whatever sad reasons but type cloning using "type X is new Y;" is not
allowed for publicly tagged types.
Personally I would prefer
subtype X is Y with Z;
to present
type X is new Y with Z;
and treat the latter rather as:
type X is new Y with Z;
= subtype <anonymous> is Y with Z;
type X is new <anonymous>;
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
prev parent reply other threads:[~2005-03-01 20:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-27 19:34 generics and records spambox
2005-02-27 20:16 ` Dmitry A. Kazakov
2005-02-27 21:31 ` spambox
2005-02-28 8:47 ` Dmitry A. Kazakov
2005-02-28 9:00 ` spambox
2005-02-28 10:07 ` Dmitry A. Kazakov
2005-02-28 6:02 ` Jeffrey Carter
2005-03-01 11:21 ` Martin Krischik
2005-03-01 19:47 ` Georg Bauhaus
2005-03-01 20:17 ` Dmitry A. Kazakov [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox