On Mon, 5 Jan 2004, Lars Gullik Bjønnes wrote:

> If you as a not so experienced C++ STL programmer can grasp the use of
> bind this quickly I am not worried about obfuscation.

I was experienced in C++ a decade ago but haven't really used it since...
In those days there was no bind, and templates were pretty new;-)

> | If we wanted more compact statements, couldn't we rewrite
> |     for ( ; par != end; ++par) {
> |                 if (par.pit() == pit)
> |                        break;
> |     }
> >
> | into something like this
> |     while ( par != end && !(par.pit() == pit) )
> |             ++par;
> >
> | but I think the first form is easier to read.
> 
> No I don't agree.

You don't find the first form easier to read?
Well, it doesn't matter...  this was really just a (failed) attempt at 
illustratring why it can be bad to make things too compact.

> I think (s == _1.getBranch()) should work. Or some close relative of
> that.

Of course.. I forgot _1 getBranch() is a member here. And since it's an 
'==' rather than a '=', it's probably not necessary to use 'var(s)' 
instead of 's'.

> PS: Thanks a lot for you input. Just what I wanted.

You're welcome... btw, you have referred to 'tr1' in some of the mails, 
what is that?

/Christian

-- 
Christian Ridderström                           http://www.md.kth.se/~chr



Reply via email to