Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2006-07-25 07:35:51

On Mon, 24 Jul 2006 20:55:39 -0400, "Beman Dawes" <bdawes_at_[hidden]>

> That's the Euclid algorithm of the type system! :-)
>Thanks for the kind words!

They were due :-) Award for merit. (Just to clarify why I'm so
enthusiast: we have all kinds of marvelous solutions here in boost, so
why am I impressed by such a "simple" thing? Well, it's my belief that
complex infrastructures are often result of education; simplicity is
the result of genius --this is IMHO illustrative: looks like Gauss was
a little rogue when he was in primary school, so the teacher, to keep
him quiet for, supposedly, a long while, assigned him the task to sum
up all integers from 1 to 100: he took the pen, observed that if you
take the last and the first number and sum them you get 101, and the
same goes if you move inwards by taking them in pairs (2+99, 3+98,
etc.) --since there were obviously 50 pairs he immediately submitted
the result: 50*101=5050. That's genius :-))

>> About the name, isn't "identifier" meant as "something which gives an
>> identity" rather than as "C++ grammar identifier"?
>Yes. Take a look at the Wikipedia article on third normal form at
>In the example, I call "part number" an identifier. It is a number assigned
>to parts to uniquely identify them. It is common for an identifier to serve
>no other purpose and its value be immaterial. So it is pretty close to what
>the database folks call a key. But the value of keys is often material, as
>in the manufacturer table in the Wikipedia article.

Yeah, pretty clear. I wouldn't like this to shift into the classical
Parkinson's bicycle shed, so I'll just have a short try: "identifier"
is IMHO a good name except for the fact that it is immediately
associated by C++ programmers with its grammar meaning, as Jeff
noticed. The term I've most frequently heard for the database-related
concept is "id", which is of course short for "identifier" but doesn't
have the drawback above. OTOH it's probably a bit too short for
library usage. Alternatively, I can see "newtype", "strong_type",
"strong_typed" or "identified"(!?). Given that the context of usage is
a derived class definition I have a slight preference for the first
and the third one, though I don't object to the current name either.

Hope this makes sense :-s

[ Gennaro Prota, C++ developer for hire ]

Boost list run by bdawes at, gregod at, cpdaniel at, john at