comp.lang.ada
 help / color / mirror / Atom feed
* Vocabulary matter: Component vs Element vs Item
@ 2013-07-25 16:38 Yannick Duchêne (Hibou57)
  2013-07-25 19:01 ` Simon Wright
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2013-07-25 16:38 UTC (permalink / raw)


This is a vocabulary question, with consistency in mind when giving names  
to things.

All three words “component”, “element” and “item” could be seen as  
interchangeable in plain English (or am I wrong?).

In the Ada literature, seems “component” is most used in “record  
component” (sometime, less commonly “record element”), and far less for  
indexed or linked structures.

The words “element” and “item” are both used in the RM's standard  
containers. Unfortunately with no consistency, as it is often mixed. Ex.  
the indefinite holders says both “element” and “item”, at the same place.  
Ex. “Replace_Element” holds a “New_Item” argument of type “Element_Type”.

Outside of Ada, “item” is widely known in DOM, for elements lists. What it  
holds is often referred to as “element”, while the access to the n‑th  
element is provided by a function named “item”… mixed again. Or may be  
this suggest to say “item” for arguments and “element” for individual  
instances (and so may be for the type too)?

Which to use in which case? Or may be prior any attempt to answer this, is  
there at least any kind of consistency with the use of these words (except  
“component”, which is less common)?

Or a more easy one: how do you read these words?


-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University

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

* Re: Vocabulary matter: Component vs Element vs Item
  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  9:56 ` Manuel Collado
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 20+ messages in thread
From: Simon Wright @ 2013-07-25 19:01 UTC (permalink / raw)


"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.

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;


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

* Re: Vocabulary matter: Component vs Element vs Item
  2013-07-25 19:01 ` Simon Wright
@ 2013-07-25 19:29   ` Jeffrey Carter
  2013-07-25 20:12   ` Yannick Duchêne (Hibou57)
  1 sibling, 0 replies; 20+ messages in thread
From: Jeffrey Carter @ 2013-07-25 19:29 UTC (permalink / raw)


On 07/25/2013 12:01 PM, Simon Wright wrote:
>
> I see that the Booch Components have this the other way round:
>
>     procedure Insert (C : in out Abstract_Collection; Elem : Item)
>     is abstract;

While the PragmAda Reusable Components Use Element for the type, and Item for 
parameters:

procedure Insert (Into : in out Handle; Item : in Element; ...

-- 
Jeff Carter
"I like it when the support group complains that they have
insufficient data on mean time to repair bugs in Ada software."
Robert I. Eachus
91


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

* Re: Vocabulary matter: Component vs Element vs Item
  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
  1 sibling, 1 reply; 20+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2013-07-25 20:12 UTC (permalink / raw)


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).

Would look like this sample:


     type Instance_Type is …;
     type Index_Type is …;


     type Item_Type is …;
     subtype Element_Type is Item_Type;

     -- Item_Type is defined first and
     -- Element_Type is a subtype of it,
     -- because Item_Type is defined
     -- independently of what will hold
     -- it. It exists as an item before
     -- it can become an element.


     procedure Append
       (Target : in out Instance_Type;
        Element : Element_Type);

     -- To the object receiving it,
     -- and which will hold it,
     -- it's an element.


     function Item
       (This : Instance_Type;
        I : Index_Type)
        return Item_Type;

     -- To the client receiving it,
     -- and which will hold it,
     -- it's first an item (may
     -- become an element later
     -- to it too).


Looks OK to me as I look at it. I believe I will opt for this convention.

Thanks for your not Simon. And Jeffrey too :-P (for the idea to look  
somewhere else)


-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University


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

* Re: Vocabulary matter: Component vs Element vs Item
  2013-07-25 20:12   ` Yannick Duchêne (Hibou57)
@ 2013-07-26  7:59     ` Simon Wright
  2013-07-26 18:42       ` Yannick Duchêne (Hibou57)
  2013-07-27  3:35       ` Randy Brukardt
  0 siblings, 2 replies; 20+ messages in thread
From: Simon Wright @ 2013-07-26  7:59 UTC (permalink / raw)


"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!

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

* Re: Vocabulary matter: Component vs Element vs Item
  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-26  9:56 ` Manuel Collado
  2013-07-26 17:24 ` Charles H. Sampson
  2013-07-29 20:25 ` Eryndlia Mavourneen
  3 siblings, 0 replies; 20+ messages in thread
From: Manuel Collado @ 2013-07-26  9:56 UTC (permalink / raw)


El 25/07/2013 18:38, Yannick Duchêne (Hibou57) escribió:
> This is a vocabulary question, with consistency in mind when giving names
> to things.
>
> All three words “component”, “element” and “item” could be seen as
> interchangeable in plain English (or am I wrong?).
>
> In the Ada literature, seems “component” is most used in “record component”
> (sometime, less commonly “record element”), and far less for indexed or
> linked structures.
>
> The words “element” and “item” are both used in the RM's standard
> containers. Unfortunately with no consistency, as it is often mixed. Ex.
> the indefinite holders says both “element” and “item”, at the same place.
> Ex. “Replace_Element” holds a “New_Item” argument of type “Element_Type”.
>
> Outside of Ada, “item” is widely known in DOM, for elements lists. What it
> holds is often referred to as “element”, while the access to the n‑th
> element is provided by a function named “item”… mixed again. Or may be this
> suggest to say “item” for arguments and “element” for individual instances
> (and so may be for the type too)?
>
> Which to use in which case? Or may be prior any attempt to answer this, is
> there at least any kind of consistency with the use of these words (except
> “component”, which is less common)?
>
> Or a more easy one: how do you read these words?

My personal opinion is:

- "Element" is a general term. More or less a synonym for "thing".
- "Component" is a member of a collection. Specially of a collection of 
heterogeneous elements (records).
- "Item" is also a member of a collection. Specially of a collection of 
similar elements (lists).

-- 
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado

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

* Re: Vocabulary matter: Component vs Element vs Item
  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-26  9:56 ` Manuel Collado
@ 2013-07-26 17:24 ` Charles H. Sampson
  2013-07-26 18:29   ` Adam Beneschan
  2013-07-29 20:25 ` Eryndlia Mavourneen
  3 siblings, 1 reply; 20+ messages in thread
From: Charles H. Sampson @ 2013-07-26 17:24 UTC (permalink / raw)


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

> This is a vocabulary question, with consistency in mind when giving names
> to things.
> 
> All three words "component", "element" and "item" could be seen as  
> interchangeable in plain English (or am I wrong?).

     I'm sorry to say that since retirement I haven't kept up with the
changes in Ada. I do still follow this newsgroup, so I have a flavor of
what's going on.

     As a result, I don't feel competent to comment on any technical
issues here, even from a historical perspective. However, I don't see
that "component", "element" and "item" are at all related in plain
English. I suspect that if you asked any reasonably literate person,
excluding computer geeks but not scientists, to distinguish between
these words, the likely response would be, Huh?"

> ...

                        Charlie
-- 
Nobody in this country got rich on his own.  You built a factory--good.
But you moved your goods on roads we all paid for.  You hired workers we
all paid to educate. So keep a big hunk of the money from your factory.
But take a hunk and pay it forward.  Elizabeth Warren (paraphrased)


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

* Re: Vocabulary matter: Component vs Element vs Item
  2013-07-26 17:24 ` Charles H. Sampson
@ 2013-07-26 18:29   ` Adam Beneschan
  2013-07-26 19:12     ` Yannick Duchêne (Hibou57)
  0 siblings, 1 reply; 20+ messages in thread
From: Adam Beneschan @ 2013-07-26 18:29 UTC (permalink / raw)


On Friday, July 26, 2013 10:24:55 AM UTC-7, Charles H. Sampson wrote:

>      As a result, I don't feel competent to comment on any technical
> issues here, even from a historical perspective. However, I don't see
> that "component", "element" and "item" are at all related in plain
> English.

Looking it up in an (American) English dictionary, www.m-w.com: Both "component" and "element" seem to mainly refer to a "constituent part" of something else.  "Element" sometimes carries the connotation of being the most rudimentary (or "elementary") part, that can't be broken down into something else, but not always.  (The elements in the periodic table were thought to be just those, substances that couldn't be broken down into smaller things, until protons and neutrons and electrons were discovered.)  "Item" has one similar definition, "a distinct part in an enumeration, account, or series"; but another relevant definition is "an object of attention, concern, or interest", which doesn't imply anything about being part of some larger thing.  So it looks like Yannick isn't too far off.  

                                -- Adam


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

* Re: Vocabulary matter: Component vs Element vs Item
  2013-07-26  7:59     ` Simon Wright
@ 2013-07-26 18:42       ` Yannick Duchêne (Hibou57)
  2013-07-26 18:53         ` Yannick Duchêne (Hibou57)
                           ` (2 more replies)
  2013-07-27  3:35       ` Randy Brukardt
  1 sibling, 3 replies; 20+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2013-07-26 18:42 UTC (permalink / raw)


Le Fri, 26 Jul 2013 09:59:46 +0200, Simon Wright <simon@pushface.org> a  
écrit:
> 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!

Don't worry for that, I know ;)

There is another common use of Item, which is with menus. Since very long,  
“Menu item” is used constantly for menu entries. This one contradicts or  
not? I feel it do, as according to the previous ideas, it should be named  
Menu Element. Just stay with and favour Ada's wording if others  
contradicts with it's own wording.

Le Fri, 26 Jul 2013 19:24:55 +0200, Charles H. Sampson  
<csampson@inetworld.net> a écrit:
>      As a result, I don't feel competent to comment on any technical
> issues here, even from a historical perspective. However, I don't see
> that "component", "element" and "item" are at all related in plain
> English. I suspect that if you asked any reasonably literate person,
> excluding computer geeks but not scientists, to distinguish between
> these words, the likely response would be, Huh?"

Sorry, not my native tong. So I just checked Merriam Webster, and  
extracted the parts looking the most relevant for the topic…

http://www.merriam-webster.com/dictionary/element
2. a constituent part
2-C. a distinct group within a larger group or community
2-F. a distinct part of a composite device

http://www.merriam-webster.com/dictionary/item
1. a distinct part in an enumeration, account, or series : article
4. a separate piece of news or information

http://www.merriam-webster.com/dictionary/component
1. a constituent part : ingredient
2-A. any one of the vector terms added to form a vector sum or resultant
2-B. a coordinate of a vector; also : either member of an ordered pair of  
numbers

2-F of Element seems to suggest it may be a synonym of Component. But I  
believe many software design literature, including UML, prefers Component  
instead of Element for that.

Would be nice if there were some explanation somewhere, about how the RM  
choose to assign their signification to Item and Element. Whether the  
thing is named from the point of view of whom send or whom receive the  
thing, is probably important too. You hardly follow a convention if you  
don't understand it :-D


-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University

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

* Re: Vocabulary matter: Component vs Element vs Item
  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  8:18         ` Simon Wright
  2 siblings, 0 replies; 20+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2013-07-26 18:53 UTC (permalink / raw)


Le Fri, 26 Jul 2013 20:42:21 +0200, Yannick Duchêne (Hibou57)  
<yannick_duchene@yahoo.fr> a écrit:

> http://www.merriam-webster.com/dictionary/component
> 1. a constituent part : ingredient
> 2-A. any one of the vector terms added to form a vector sum or resultant
> 2-B. a coordinate of a vector; also : either member of an ordered pair  
> of numbers

Drifting a bit now: 2-B make me feel Component should be used for a  
polynomials, and not Element. Is this is OK?

-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University

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

* Re: Vocabulary matter: Component vs Element vs Item
  2013-07-26 18:29   ` Adam Beneschan
@ 2013-07-26 19:12     ` Yannick Duchêne (Hibou57)
  2013-07-26 19:56       ` Adam Beneschan
  0 siblings, 1 reply; 20+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2013-07-26 19:12 UTC (permalink / raw)


Le Fri, 26 Jul 2013 20:29:05 +0200, Adam Beneschan <adambeneschan@aol.com>  
a écrit:

> On Friday, July 26, 2013 10:24:55 AM UTC-7, Charles H. Sampson wrote:
>
>>      As a result, I don't feel competent to comment on any technical
>> issues here, even from a historical perspective. However, I don't see
>> that "component", "element" and "item" are at all related in plain
>> English.
>
> Looking it up in an (American) English dictionary, www.m-w.com: Both  
> "component" and "element" seem to mainly refer to a "constituent part"  
> of something else.
Merriam Webster seems to implies the same.

> "Element" sometimes carries the connotation of being the most  
> rudimentary (or "elementary") part, that can't be broken down into  
> something else,
UML and software literature seems to agree with this: components are more  
big things than elements.

> but not always.
Yes, a famous exception is an XML element.

> (The elements in the periodic table were thought to be just those,  
> substances that couldn't be broken down into smaller things, until  
> protons and neutrons and electrons were discovered.)  "Item" has one  
> similar definition, "a distinct part in an enumeration, account, or  
> series"; but another relevant definition is "an object of attention,  
> concern, or interest",
Merriam Webster says there is a now obsolete meaning, where Item was  
designating a Warning or Hint.


-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University

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

* Re: Vocabulary matter: Component vs Element vs Item
  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
  2 siblings, 1 reply; 20+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2013-07-26 19:29 UTC (permalink / raw)


Le Fri, 26 Jul 2013 20:42:21 +0200, Yannick Duchêne (Hibou57)  
<yannick_duchene@yahoo.fr> a écrit:

> Would be nice if there were some explanation somewhere, about how the RM  
> choose to assign their signification to Item and Element. Whether the  
> thing is named from the point of view of whom send or whom receive the  
> thing, is probably important too. You hardly follow a convention if you  
> don't understand it :-D

What about this one, which is fortunately compatible with choice made for  
the Ada standard containers:

  * Component, Element and Item, are all constituents of
    some kind of aggregate.
  * A Component is a big Element, an Element is a more
    rudimentary thing than a Component.
  * A component may be made of Elements. An Element is
    not said to be made of Components (there may be rare
    exceptions). An Element may still be made of Elements.
  * An Item is not a kind of thing, but a status.
  * An Item is an Element or Component of particular attention
    or which receive some kind of focus at some or time.
  * The type of an Item is either that of an Element or
    a Component.

It's compatible with:

  * XML wordings
  * wording used to talk about menus and UIs
  * Ada standard containers naming convention
  * UML wording
  * Current and obsolete meaning of Item
  * Close meanings of Element and Component

Above all, this would explain why for Ada containers, an Item argument is  
of an Element_Type: it's an Element, which receive a particular attention  
at some point.

So I was wrong with my idea of defining an Item_Type first and then a  
subtype of it named Element_Type. There is just an Element_Type, whose  
instances may be generically named either Element or Item.



-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University

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

* Re: Vocabulary matter: Component vs Element vs Item
  2013-07-26 19:12     ` Yannick Duchêne (Hibou57)
@ 2013-07-26 19:56       ` Adam Beneschan
  0 siblings, 0 replies; 20+ messages in thread
From: Adam Beneschan @ 2013-07-26 19:56 UTC (permalink / raw)


On Friday, July 26, 2013 12:12:25 PM UTC-7, Hibou57 (Yannick Duchêne) wrote:

> > Looking it up in an (American) English dictionary, www.m-w.com: Both  
> > "component" and "element" seem to mainly refer to a "constituent part"  
> > of something else.
> 
> Merriam Webster seems to implies the same.

Well, I should hope so, since m-w.com **is** Merriam-Webster :) :) 

                              -- Adam


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

* Re: Vocabulary matter: Component vs Element vs Item
  2013-07-26  7:59     ` Simon Wright
  2013-07-26 18:42       ` Yannick Duchêne (Hibou57)
@ 2013-07-27  3:35       ` Randy Brukardt
  2013-07-27 15:57         ` Shark8
  1 sibling, 1 reply; 20+ messages in thread
From: Randy Brukardt @ 2013-07-27  3:35 UTC (permalink / raw)


"Simon Wright" <simon@pushface.org> wrote in message 
news:ly38r1u4y5.fsf@pushface.org...
...
> 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!).

Yikes! This gave me a flashback to long discussions about the names of 
parameters and the like. I hope I don't have nightmares tonight. :-) ARG 
discussions about naming are rarely pleasant, because *everyone* has an 
opinion, and often they're completely different.

                                                      Randy. 




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

* Re: Vocabulary matter: Component vs Element vs Item
  2013-07-26 19:29         ` Yannick Duchêne (Hibou57)
@ 2013-07-27  3:42           ` Randy Brukardt
  0 siblings, 0 replies; 20+ messages in thread
From: Randy Brukardt @ 2013-07-27  3:42 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]

Le Fri, 26 Jul 2013 20:42:21 +0200, Yannick Duchêne (Hibou57)
<yannick_duchene@yahoo.fr> a écrit:

> Would be nice if there were some explanation somewhere, about how the RM 
> choose to assign their signification to Item and Element. Whether the 
> thing is named from the point of view of whom send or whom receive the 
> thing, is probably important too. You hardly follow a convention if you 
> don't understand it :-D

"component" has a formal definition in Ada (3.2(2)); as do "subcomponent" 
and (unfortunately) "part".

OTOH, "element" and "item" are just used in one of the predefined packages, 
which is a much more informal usage. You can find this out by looking in the 
index of the LRM; terms that have definitions are indexed to those 
definitions.

While "component" is indexed to 3.2(2), "element" is just indexed to the 
containers and to storage pools (not a general term), and "item" doesn't 
appear at all. (It is only used in it's English sense.)

Summary: You can try too hard to make sense of a pattern when there isn't 
any. :-)

                                                      Randy.




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

* Re: Vocabulary matter: Component vs Element vs Item
  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  8:18         ` Simon Wright
  2 siblings, 0 replies; 20+ messages in thread
From: Simon Wright @ 2013-07-27  8:18 UTC (permalink / raw)


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

> Would be nice if there were some explanation somewhere, about how the
> RM choose to assign their signification to Item and Element. Whether
> the thing is named from the point of view of whom send or whom receive
> the thing, is probably important too. You hardly follow a convention
> if you don't understand it :-D

I'd say it's important to name things from the p.o.v. of the user, in
the same way as we write Ada with consideration for the reader. The
implementer can always (usually?) rename internally to make their life
easier, but would have to weigh this against introducing yet more names.

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

* Re: Vocabulary matter: Component vs Element vs Item
  2013-07-27  3:35       ` Randy Brukardt
@ 2013-07-27 15:57         ` Shark8
  0 siblings, 0 replies; 20+ messages in thread
From: Shark8 @ 2013-07-27 15:57 UTC (permalink / raw)


On Friday, July 26, 2013 9:35:16 PM UTC-6, Randy Brukardt wrote:
> 
> 
> Yikes! This gave me a flashback to long discussions about the names of 
> parameters and the like. I hope I don't have nightmares tonight. :-) ARG 
> discussions about naming are rarely pleasant, because *everyone* has an 
> opinion, and often they're completely different.

That's very true. I'm surprised I haven't seen more usage of fully-qualified naming for parameter types. As an example reformulating from Booch's convention:

    package Stack_Sequential_Unbounded_Managed_Iterator is
       type Stack is limited private;
       procedure Clear (The_Stack : in out Stack);

becomes the following:
    package Stack_Sequential_Unbounded_Managed_Iterator is
        type Stack is limited private;
        procedure Clear (Stack : in out Stack_Sequential_Unbounded_Managed_Iterator.Stack);

This allows for some very nice named parameter associations with comparatively little effort on the part of the programmer writing the package (especially when you use RENAMES on the package's fully-qualified name in the package-body).


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

* Re: Vocabulary matter: Component vs Element vs Item
  2013-07-25 16:38 Vocabulary matter: Component vs Element vs Item Yannick Duchêne (Hibou57)
                   ` (2 preceding siblings ...)
  2013-07-26 17:24 ` Charles H. Sampson
@ 2013-07-29 20:25 ` Eryndlia Mavourneen
  2013-07-29 22:30   ` Yannick Duchêne (Hibou57)
  3 siblings, 1 reply; 20+ messages in thread
From: Eryndlia Mavourneen @ 2013-07-29 20:25 UTC (permalink / raw)


In my own experience:

1) "Element" is one of a collection of the same or similar type of thing, as in an array.  We have the chemical elements, too, which are all chemically irreducible pieces of matter.

2) "Component" is a member of a construct of (possibly) differing types of things.  I can have a component of a TV set, The Booch Components, or a record.

3) "Item" is a selection -- could be from a menu or not.  In a loop, the current constant is an item, regardless of whether it is an element, a selection from a container, or eggs and bacon. 

-- Eryndlia (KK1T)

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

* Re: Vocabulary matter: Component vs Element vs Item
  2013-07-29 20:25 ` Eryndlia Mavourneen
@ 2013-07-29 22:30   ` Yannick Duchêne (Hibou57)
  2013-07-30 13:46     ` Eryndlia Mavourneen
  0 siblings, 1 reply; 20+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2013-07-29 22:30 UTC (permalink / raw)


Le Mon, 29 Jul 2013 22:25:19 +0200, Eryndlia Mavourneen  
<eryndlia@gmail.com> a écrit:

> In my own experience:
>
> 1) "Element" is one of a collection of the same or similar type of  
> thing, as in an array.  We have the chemical elements, too, which are  
> all chemically irreducible pieces of matter.
>
> 2) "Component" is a member of a construct of (possibly) differing types  
> of things.  I can have a component of a TV set, The Booch Components, or  
> a record.
>
> 3) "Item" is a selection -- could be from a menu or not.  In a loop, the  
> current constant is an item, regardless of whether it is an element, a  
> selection from a container, or eggs and bacon.
>
> -- Eryndlia (KK1T)

Your comment on Item related to loop, is clever and interesting.

About point #1, how do you relate it to #3? Do you feel as I do it's a  
matter of point of view? An item for the client adding something to a  
container, and is an element for the container, thus the Element_Type  
instead of Item_Type? I was interested in the question in a more general  
way than containers (the same question rise in other patterns too), this  
is just that the case of containers speaks easily and the Ada standard  
containers use this naming convention.

-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University

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

* Re: Vocabulary matter: Component vs Element vs Item
  2013-07-29 22:30   ` Yannick Duchêne (Hibou57)
@ 2013-07-30 13:46     ` Eryndlia Mavourneen
  0 siblings, 0 replies; 20+ messages in thread
From: Eryndlia Mavourneen @ 2013-07-30 13:46 UTC (permalink / raw)


On Monday, July 29, 2013 5:30:46 PM UTC-5, Hibou57 (Yannick Duchêne) wrote> Le Mon, 29 Jul 2013 22:25:19 +0200, Eryndlia Mavourneen  
> <eryndlia@gmail.com> a écrit:
> 
> > In my own experience:
> >
> > 1) "Element" is one of a collection of the same or similar type of  
> > thing, as in an array.  We have the chemical elements, too, which are  
> > all chemically irreducible pieces of matter.
> >
> > 2) "Component" is a member of a construct of (possibly) differing types  
> > of things.  I can have a component of a TV set, The Booch Components, or  
> > a record.
> >
> > 3) "Item" is a selection -- could be from a menu or not.  In a loop, the  
> > current constant is an item, regardless of whether it is an element, a  
> > selection from a container, or eggs and bacon.
> >
> > -- Eryndlia (KK1T)
> 
> Your comment on Item related to loop, is clever and interesting.
> 
> About point #1, how do you relate it to #3? Do you feel as I do it's a  
> matter of point of view? An item for the client adding something to a  
> container, and is an element for the container, thus the Element_Type  
> instead of Item_Type? I was interested in the question in a more general  
> way than containers (the same question rise in other patterns too), this  
> is just that the case of containers speaks easily and the Ada standard  
> containers use this naming convention.

Much of meaning (semantics) is point-of-view.  If you harm me, then it effects me in ways you likely never considered.  You may not know of my child, my varied business interests, acquaintances, etc.  I do not know the rationale for using the word "element" to describe a construct within the container, except that, from the point-of-view of the container, an element is irreducible and is one of many structurally similar entities within that container.

Also, don't forget that I was using "item" to mean a selection of some kind.  From the loop's point-of-view, the element of the container being examined *is* the item to be processed.

-- Eryndlia (KK1T)


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

end of thread, other threads:[~2013-07-30 13:46 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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