Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2002-11-17 08:46:31

----- Original Message -----
From: "Pavol Droba" <droba_at_[hidden]>

> > Your example would become
> >
> > if ( lower_cased( trimmed( s ) ) = "ok" )
> >
> This naming sounds good enough, just I'm not sure if such a difference
> two variants would not make the code less readable. Alfter all both of
>them are doing
> the same thing.
Well, 'trim_in' was not too good either. Basically, we are trying to improve
on _in, right?

> What I don't get is why are you proposing to change return value from Seq&
>to void.
> I think it is easier fo write
> to_lower(trim(to_upper(s)));
> then
> to_upper(s); trim(s); to_lower(s);

Chaining is not always good. How often are one going to do it/need it?
I would simply write a small foo( String& s ) { to_lower(s); trim(s);
to_upper(s); }.
If I do use string manipulation a lot I will probably could reuse foo(); I a
way chaining
encourages people to avoid writing small helpers; highly unfortunate IMO.


Thorsten, AAU

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