comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Universal type
Date: Sun, 05 Aug 2007 15:46:51 +0200
Date: 2007-08-05T15:46:51+02:00	[thread overview]
Message-ID: <1610745.7KfYLUSmYx@linux1.krischik.com> (raw)
In-Reply-To: 1186165731.373877.257550@i13g2000prf.googlegroups.com

 shaunpatterson@gmail.com wrote:

> I'm looking to store different kinds of objects into a vector, queue,
> etc
> 
> In Java, everything is derived from Object.  Is there something
> similar
> in Ada? 

Yes: System.Address. Ok, that's a joke - but with a true core: Java too does
not store instances of Object - it too stores pointers of  instances of
Object. Ok, the pointers are hidden from sight - but so are the pointers
used in Unlimited_Vector.

And also, you can't store "int" in a a Java Vector - you can only
store "Integer". And behind the scenes it is again a "pointer to Integer".
Which is exactly what Unlimited_Vector does.

So again Yes: If you are prepared to accept the same restrictions which are
valid in Java. 

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com



      parent reply	other threads:[~2007-08-05 13:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 18:28 Universal type shaunpatterson
2007-08-03 18:31 ` shaunpatterson
2007-08-03 19:10   ` Dmitry A. Kazakov
2007-08-03 20:35     ` Maciej Sobczak
2007-08-03 21:54       ` shaunpatterson
2007-08-04  1:10         ` Jeffrey R. Carter
2007-08-04  7:21       ` Dmitry A. Kazakov
2007-08-03 23:03 ` Georg Bauhaus
2007-08-05 13:46 ` Martin Krischik [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