Andre Poenitz <[EMAIL PROTECTED]> writes:

| I'd actually prefer to put one-liners directly in the class definition in
| my own coding as a matter of convienience and better readability, too. Of
| course, the latter is arguable, but if I see
| 
|    size_type size() const
|      { return data_.size(); }

Yes, but too often this is not one-liners, but two-liners on one line:

     size_type size() const { Assert(...); return data_.size(); }

And this is something that I really like.

I also belive that the class definition in itself become a lot more
cleaner when the inlines are put _after_ the definition. _If_ the you
have to scroll "far" to to get from the declaration to the definition
there is probably something bad with the class' structure it should
probably be split (and yes we have this problem in several LyX
classes)
  
| This does not only quadruple the amount of typing (which is a pain for the
| wrists, I am _very_ aware of that) and occupies twice as much space on
| screen, it is also takes more key presses for moving around.

ok... I don't have any wrist problem...

| 
| And it gets even worse with templates... 
| 
| No, I am not advocating "my style",  I am pretty happy with current LyX as
| long as it stays uniform. I am just trying to support Asgers words

I choose this way sine it is often what I see suggested by really good
C++ programmers.
 
| " The code is often easier to understand when the definition is close to the
|   declaration for these bits of code that are really simple. "
| 
| ****, in "real code" we prefer 'int i = 5;'  over 'int i; [...] i = 5;' too,
| don't we?

Yes, but that is not only a "keep-declaration-and-definition" close
rule, but also a "dont-initilize-twice" rule.

        Lgb

Reply via email to