Boost logo

Boost Users :

Subject: Re: [Boost-users] Iterating over the seconds of a list of pairs
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2009-08-09 12:49:28


2009/8/9 Björn Karlsson <Bjorn.Karlsson_at_[hidden]>

>
> The advantages of this approach are that it's short, elegant, and all the
> logic is locally defined. (It's also quite cool.) However, you must know
> your audience -- not everyone is comfortable reading and understanding code
> like this.

Ok, I like this solution, and is the solution that broadly occurred to me
when I read the OP - which you beat me to
answering!

However I'm more interested in different takes on your final comment, "...,
you must know your audience...".

I do struggle with this one at work sometimes - I'm generally inclined to
write the kind of code you present,
because it's good code, because it's the right solution, and because to do
otherwise would be condescending
and patronising to my colleagues. However, I sometimes find myself
criticised for writing overly complex
code, and by extension for not being a team player.

Any thoughts?

- Rob.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net