On Mon, Oct 13, 2003 at 10:24:10AM +0200, Lars Gullik Bjønnes wrote:
> | We'd never, ever need to know whether this is set or not. You can put in
> | arbitrary values in this variable at any point of time _except_ at the
> | end of 'metrics'.
> 
> The you need to be pretty sure that is it never used before metrics is
> called, can you vouch for that?

Can you vouch that you would not type boost::shared_ptr if you mean
boost::scoped_ptr? Or 'i' instead of j'? I can't.  So I can't vouch for
not using the cache before it is set. But I will notice if I do.

> Use of optional would enforce it.
>
> | I'd really like to suggest promoting the 'KISS' principle to the top of
> | the 'nice to have' stuff.
> 
> Sure. To me use of boost::optional actually makes code KISSier. Why?
> It gets more explicit, harder to mis-use etc.

But it is not. You are fending against problems that are obvious to
solve once they occur. A broken xy cache would mean the cursor is
completely off after clicking in a formula. This would be dead easy to
spot and fixable in a minute.

Instead of fixing real problems one safety belt after the other gets
introduced until nobody will be able to tell what part of the code is
"the code" and what part is just "nice to have, just in case". 

I'd really, really like to see the code. Not much else. 

Another point: 'KISS' also means that a random, non-guru-style-
programmer can read the code and possibly contribure. As long as
boost:: is not std:: there is reason to expect an ordinary C++
programmer to be as proficient with boost as you are.

I know that the argument does not count for you although I fail to see
why. For me it counts anyway: The project is losing contributors if
the bar is raised too high.  I don't think we can afford that.

Andre'

Reply via email to