From: Niklas Holsti <niklas.holsti@nospam.please>
Subject: Re: Ada.Containers.Indefinite_Doubly_Linked_Lists
Date: Mon, 05 Feb 2007 22:39:19 +0200
Date: 2007-02-05T22:39:19+02:00 [thread overview]
Message-ID: <45c79601$0$24600$39db0f71@news.song.fi> (raw)
In-Reply-To: <mailman.71.1170697701.18371.comp.lang.ada@ada-france.org>
Carroll, Andrew wrote:
> [ ... ]
> Package Attribute_List is new new
> Ada.Containers.Indefinite_Doubly_Linked_Lists (Attribute);
>
> Type Table is record
> Name: String(50);
> Attributes: Attribute_List;
^^^^^^^^^^^^^^
Should be Attribute_List.List;
because Attribute_List is a package that manages lists of Attributes,
not a data type. The data type is Attribute_List.List.
> End record
> Package Table_List is new Ada.Containers.Indefinite_Doubly_Linked_Lists
> (Table);
I find it clearer to use names in plural form for packages that manage
many objects of a given type. In this case I would use the name
Attribute_Lists (not ..._List) for the package that manages lists of
Attribute objects (each such list is an object of type
Attribute_Lists.List). I would use the name Table_Lists for the package
that manages lists of Table objects (each such list is an object of type
Table_Lists.List).
The language-defined Ada packages use the same convention, for example
Ada.Containers.Doubly_Linked_Lists (not ..._List). Of course you can use
any names you like.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
prev parent reply other threads:[~2007-02-05 20:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-05 17:47 Ada.Containers.Indefinite_Doubly_Linked_Lists Carroll, Andrew
2007-02-05 18:33 ` Ada.Containers.Indefinite_Doubly_Linked_Lists Jeffrey R. Carter
2007-02-05 20:39 ` Niklas Holsti [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