$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Yuval Ronen (ronen_yuval_at_[hidden])
Date: 2006-07-03 01:21:36
Pavol Droba wrote:
> Well, it depends on what you define as 'de-facto' standard.
> I think that both names are equaly good.
> 
> A quick 2-minute search gives me few example in favor of trim_left:
> - Microsoft - All libraries provieded by microsoft MFC, ATL, .Net, use
>   *Left versions
> - Symbian API - has TrimLeft
> 
> - Probably not very serious, but simple google comparison give following
> results:
> "trimhead OR trimhead" : 1,510 results
> "trim_left OR trimleft" : 40,400 results
> 
> I don't have much time to look elsewhere, feel free to supply
> counterexamples.
I don't have any counterexamples. These examples you supplied are 
exactly what I meant when I said it's "de-facto standard".
> Before considering your proposal, I would really need to see
> better argument then your personal opinion, since changing a name
> of a function that is already in use for some time is quite serious
> issue.
Just my opinion? Strings do not know how they are going to be printed - 
Left-to-right, right-to-left, top-to-bottom, in diagonal, or in circles. 
String objects don't have a 'right' or a 'left', only 'head' and 'tail', 
and that's not just my opinion, that's a fact. All the rest of your 
functions correctly use head/tail naming, instead of left/right.
What is open for discussion is whether to change the name of a function 
already in use. I agree that it's a serious issue. Perhaps both should 
be supplied for now, with the right/left gradually deprecated. Or maybe 
never deprecated and both live together happily ever after. I'm not 
sure. The important thing is that if you propose it for TR2, I think 
that it should be head/tail - to be consistent with the rest of the 
library, and for the noble cause of being correct.
Yuval