comp.lang.ada
 help / color / mirror / Atom feed
From: Hyman Rosen <hyrosen@mail.com>
Subject: Re: SIGada Conference
Date: Wed, 17 Dec 2003 13:55:03 -0500
Date: 2003-12-17T13:55:03-05:00	[thread overview]
Message-ID: <1071687303.254780@master.nyc.kbcfp.com> (raw)
In-Reply-To: <5f5qrb.0un.ln@skymaster>

Jean-Pierre Rosen wrote:
> "Hyman Rosen" <hyrosen@mail.com> a �crit
>>I expect this is just the usual "simulate MI with access discriminants"
>>bit that always comes up here. I think it can do everything except support
>>cross-casting.
> 
> It can. See my paper at http://www.adalog.fr/publicat/ada-interfaces.pdf

Does this mean that you think it can support cross-casting,
or do you agree that it cannot? That is, in Java, I may have
two interfaces:
     interface IF_1 { }    interface IF_2 { }
and given an object of type IF_1, I may try to see if it is
also of type IF_2:
     boolean is_both(IF_1 o) { return o instanceof IF_2; }
and if it is, I can cross-cast:
     IF_2 as_IF_2(IF_1 o) { return is_both(o) ? (IF_2)o : null; }

Note that I can do this without any knowledge at all of the
existence of one or more parent types which implement both
interfaces. I don't think this can be done with the inner class/
access discriminant approach.




  reply	other threads:[~2003-12-17 18:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-16 18:39 SIGada Conference amado.alves
2003-12-16 21:40 ` Georg Bauhaus
2003-12-16 22:17   ` Hyman Rosen
2003-12-17 17:51     ` Jean-Pierre Rosen
2003-12-17 18:55       ` Hyman Rosen [this message]
2004-01-05  9:19         ` Jean-Pierre Rosen
2004-01-05 15:35           ` Hyman Rosen
2003-12-16 23:33 ` Martin Dowie
  -- strict thread matches above, loose matches on Subject: below --
2003-12-17 13:31 amado.alves
2003-12-17 13:11 amado.alves
     [not found] <468D78E4EE5C6A4093A4C00F29DF513D04B82B08@VS2.hdi.tvcabo>
2003-12-17  1:01 ` Stephen Leake
2003-12-17  3:19   ` Robert I. Eachus
2003-12-18  6:55     ` Robert C. Leif
2003-12-15 23:01 Chris Miller
2003-12-16  0:29 ` Stephen Leake
2003-12-16 11:19   ` Georg Bauhaus
2003-12-17  0:58     ` Stephen Leake
2003-12-16 13:10   ` Marin David Condic
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox