From: anon@att.net
Subject: Re: Overloading attributes
Date: Sun, 27 Nov 2011 20:00:39 +0000 (UTC)
Date: 2011-11-27T20:00:39+00:00 [thread overview]
Message-ID: <jau4t6$7ms$1@speranza.aioe.org> (raw)
In-Reply-To: jasnea$ac1$1@dont-email.me
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2398 bytes --]
From time to time this forum has discussed the concept of the
"attribute definition clause" (Representation Attributes). Some have
even say it would cause an increase of 4_000 lines of code to be
written to include this feature in a compiler.
From Ada 95 RM
13.3 Representation Attributes
2 attribute_definition_clause ::=
for local_name'attribute_designator use expression;
| for local_name'attribute_designator use name;
Legality Rules
5 (95)
5/1 (2005)
An attribute_designator is allowed in an attribute_definition_clause only
if this International Standard explicitly allows it, or for an
implementation-defined attribute if the implementation allows it. Each
specifiable attribute constitutes an aspect of representation.
This clause does not forbid the creation of new attribute it only states
that it is up to the implementation to allow it if the Standard does not
explicitly allows it.
For instant, the implementation could say that the programmer can create
new attributes for types created by the programmer only. Aka like the
attribute "Image" (which is define for scalar objects), for a programmer
defined record. Or the implementation could predefine a set of "attribute
designators" that could be used by a programmer.
And for Ada 83, the complete syntax and implementation of must be
documented in Appendix F for the allowed representation clauses.
So, Ada 83 allows the creation with just documentation. As for Standards
Ada 95, Ada 2005 and Ada 2012 they started to limit the usage, but still
allow with the implementation permission.
Which means that Ada can allow a programmer to create "Representation
Attributes" aka "Attributes" with some limitations if the Standard
or the Implementation allows it.
In <jasnea$ac1$1@dont-email.me>, "J-P. Rosen" <rosen@adalog.fr> writes:
>Le 27/11/2011 04:36, anon@att.net a �crit :
>> In Ada, Overloading is allow for all attributes include programmers
>> created attributes.
>please point me at the RM paragraphe that allows programmers created
>attributes, I must have missed something!
>
>--
>---------------------------------------------------------
> J-P. Rosen (rosen@adalog.fr)
>Adalog a d�m�nag� / Adalog has moved:
>2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
>Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
next prev parent reply other threads:[~2011-11-27 20:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-26 23:13 Overloading attributes Matt Borchers
2011-11-26 23:24 ` Shark8
2011-11-27 7:38 ` Yannick Duchêne (Hibou57)
2011-11-27 3:36 ` anon
2011-11-27 7:04 ` J-P. Rosen
2011-11-27 20:00 ` anon [this message]
2011-11-27 20:34 ` Yannick Duchêne (Hibou57)
2011-11-27 20:50 ` Yannick Duchêne (Hibou57)
2011-11-27 23:10 ` J-P. Rosen
2011-11-28 9:11 ` anon
2011-11-28 10:53 ` Peter C. Chapin
2011-11-29 11:58 ` anon
2011-11-29 12:50 ` Mark Lorenzen
2011-11-30 11:05 ` anon
2011-11-29 16:16 ` AdaMagica
2011-11-29 17:43 ` Jeffrey Carter
2011-11-29 23:26 ` J-P. Rosen
2011-11-30 11:06 ` anon
2011-11-30 15:52 ` J-P. Rosen
2011-11-30 17:27 ` Yannick Duchêne (Hibou57)
2011-11-30 20:45 ` Pascal Obry
2011-12-01 11:01 ` Simon Wright
2011-12-02 18:55 ` anon
2011-12-02 19:34 ` Ludovic Brenta
2011-12-02 20:02 ` Yannick Duchêne (Hibou57)
2011-12-03 1:41 ` Randy Brukardt
2011-11-28 12:06 ` Ludovic Brenta
2011-11-27 5:11 ` Yannick Duchêne (Hibou57)
2011-11-27 12:57 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox