comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Vocabulary matter: Component vs Element vs Item
Date: Fri, 26 Jul 2013 08:59:46 +0100
Date: 2013-07-26T08:59:46+01:00	[thread overview]
Message-ID: <ly38r1u4y5.fsf@pushface.org> (raw)
In-Reply-To: op.w0snqmf0ule2fv@cardamome

"Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr> writes:

> Le Thu, 25 Jul 2013 21:01:38 +0200, Simon Wright <simon@pushface.org>
> a écrit:
>
>> "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr> writes:
>>
>>> All three words "component", "element" and "item" could be seen as
>>> interchangeable in plain English (or am I wrong?).
>>
>> I have a feeling that in English (BrE) "component" and "element" are
>> more-or-less synonymous, but "item" isn't. "The solution to the
>> problem has five Xs" - X could be component or element, but not item;
>> an item is a thing on its own, whereas a component or an element is
>> one of many.
>
> Sounds correct.
>
>> So I think that the Ada Containers match this notion: a container can
>> have elements (of element_type, eeew), and you replace one of them by
>> an item.
>>
>> I see that the Booch Components have this the other way round:
>>
>>    procedure Insert (C : in out Abstract_Collection; Elem : Item)
>>    is abstract;
>
> After your note above, I now less feel it's an issue to mix both in a
> same domain (or package, to speak Ada). Remains the case you point
> with the swapped choice made in the Booch Components.
>
> May be a way to solve it, is to have an Element_Type which is a
> subtype (as a type aliasing) of Item_Type. This would allow to have
> both mixed case while having consistency between an argument name and
> its type (there are cases where it's better to simply name a thing
> after its type).

I don't think anyone should take the design choices made in the BCs in
1998 as being in any way definitive. I didn't choose Item/Elem, and I
suspect that a lot more effort went into Ada.Containers naming
conventions (they were at least reviewed by the ARG!).

And the BCs are definitely in maintenance now!

  reply	other threads:[~2013-07-26  7:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25 16:38 Vocabulary matter: Component vs Element vs Item Yannick Duchêne (Hibou57)
2013-07-25 19:01 ` Simon Wright
2013-07-25 19:29   ` Jeffrey Carter
2013-07-25 20:12   ` Yannick Duchêne (Hibou57)
2013-07-26  7:59     ` Simon Wright [this message]
2013-07-26 18:42       ` Yannick Duchêne (Hibou57)
2013-07-26 18:53         ` Yannick Duchêne (Hibou57)
2013-07-26 19:29         ` Yannick Duchêne (Hibou57)
2013-07-27  3:42           ` Randy Brukardt
2013-07-27  8:18         ` Simon Wright
2013-07-27  3:35       ` Randy Brukardt
2013-07-27 15:57         ` Shark8
2013-07-26  9:56 ` Manuel Collado
2013-07-26 17:24 ` Charles H. Sampson
2013-07-26 18:29   ` Adam Beneschan
2013-07-26 19:12     ` Yannick Duchêne (Hibou57)
2013-07-26 19:56       ` Adam Beneschan
2013-07-29 20:25 ` Eryndlia Mavourneen
2013-07-29 22:30   ` Yannick Duchêne (Hibou57)
2013-07-30 13:46     ` Eryndlia Mavourneen
replies disabled

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