comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Abusing tagged types
Date: Fri, 28 Nov 2008 02:01:09 -0800 (PST)
Date: 2008-11-28T02:01:09-08:00	[thread overview]
Message-ID: <e4dd59e7-2a64-4964-9e24-1502a9c3bce2@w35g2000yqm.googlegroups.com> (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



             reply	other threads:[~2008-11-28 10:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28 10:01 Maciej Sobczak [this message]
2008-11-28 10:50 ` Abusing tagged types 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
replies disabled

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