comp.lang.ada
 help / color / mirror / Atom feed
* Abusing tagged types
@ 2008-11-28 10:01 Maciej Sobczak
  2008-11-28 10:50 ` Samuel Tardieu
  0 siblings, 1 reply; 7+ messages in thread
From: Maciej Sobczak @ 2008-11-28 10:01 UTC (permalink / raw)


Is it considered to be a good practice to make a given type tagged
only to benefit from the Object.Operation notation in Ada 2005?

Let's say there is a library where there are several types. Some of
them are inherently tagged due to their design and they allow Obj.Oper
notation out of the box. For others there is no design motivation to
make them tagged (no dispatching calls for them, no Controlled, etc.)
and as a result the whole library does not "feel" consistent, since
Obj.Oper is not available across all exposed types.

The type can be made tagged *only* to get the syntax sugar.
Is it considered to be an abuse of the language feature?

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

Database Access Library for Ada: www.inspirel.com/soci-ada



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-12-02  4:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-28 10:01 Abusing tagged types Maciej Sobczak
2008-11-28 10:50 ` Samuel Tardieu
2008-11-28 13:28   ` Maciej Sobczak
2008-11-28 14:08     ` Ludovic Brenta
2008-12-01 19:54       ` Adam Beneschan
2008-12-02  4:04         ` Randy Brukardt
2008-11-28 14:35     ` Jean-Pierre Rosen

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