From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Instantiating private types with discriminants?
Date: Fri, 12 May 2006 14:40:37 +0200
Date: 2006-05-12T14:40:37+02:00 [thread overview]
Message-ID: <1dwuemv53sbgw$.1pgg57qa5hsdr.dlg@40tude.net> (raw)
In-Reply-To: 1147425891.9012.10.camel@localhost.localdomain
On Fri, 12 May 2006 11:24:52 +0200, Georg Bauhaus wrote:
> On Fri, 2006-05-12 at 09:37 +0200, Dmitry A. Kazakov wrote:
>
>> I beg to disagree. Semantic difference you are talking about is not always
>> the problem space's one. It is often just a language artefact. In my view,
>> exactly the opposite should be done, i.e. removing all traces of "all".
>> (:-)) A user-defined pointer (referential) type should (IMO) be considered
>> a subtype, that inherits all operations of the target type. If assignment
>> gets overridden (to have shallow copy semantics), that does not
>> automatically imply anything for other operations.
>
> Will the programmer have a chance to express whether or not
> he or she is effectively creating an alias?
The result is typed, that should express it. Ada is very strict about
types.
> Eiffel addresses this in a reversed way, I think. You can write
> "expanded" before a class definition, or before the type name
> in a feature declaration. So no ".all" either, but at least
> a trace of objects versus references.
Ada has "access qualifier" producing anonymous access type. I don't like
anonymous types much. They require structural types equivalence.
BTW, if pointer were a subtype, then you wouldn't need hard-wired
dispatching on "access T", because the pointer will simply inherit
primitive operations and thus dispatch.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2006-05-12 12:40 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-09 13:17 Instantiating private types with discriminants? rick H
2006-05-09 13:45 ` Georg Bauhaus
2006-05-09 14:06 ` rick H
2006-05-09 13:56 ` Ludovic Brenta
2006-05-09 14:24 ` rick H
2006-05-09 19:48 ` Ludovic Brenta
2006-05-09 14:05 ` Dmitry A. Kazakov
2006-05-09 14:48 ` rick H
2006-05-09 15:20 ` Jerry Petrey
2006-05-09 15:42 ` rick H
2006-05-09 15:53 ` Avoiding use Ada.Tags (was Re: Instantiating private types with discriminants?) Alex R. Mosteo
2006-05-09 16:01 ` Instantiating private types with discriminants? Dmitry A. Kazakov
2006-05-10 7:42 ` rick H
2006-05-10 9:09 ` Ludovic Brenta
2006-05-10 11:49 ` Georg Bauhaus
2006-05-10 13:44 ` rick H
2006-05-10 14:21 ` Ludovic Brenta
2006-05-10 15:10 ` rick H
2006-05-10 15:45 ` Ludovic Brenta
2006-05-10 14:41 ` Dmitry A. Kazakov
2006-05-10 15:34 ` rick H
2006-05-10 19:01 ` Georg Bauhaus
2006-05-10 19:05 ` Ludovic Brenta
2006-05-10 21:52 ` Rick H
2006-05-11 1:17 ` Jeffrey R. Carter
2006-05-11 7:44 ` Dmitry A. Kazakov
2006-05-11 8:27 ` rick H
2006-05-11 10:28 ` Dmitry A. Kazakov
2006-05-11 15:59 ` Robert A Duff
2006-05-12 7:37 ` Dmitry A. Kazakov
2006-05-12 9:24 ` Georg Bauhaus
2006-05-12 12:40 ` Dmitry A. Kazakov [this message]
2006-05-12 18:25 ` Randy Brukardt
2006-05-09 19:57 ` "Use" and "=" for Tags (was: Re: Instantiating private types with discriminants?) Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox