[openbeos] Re: Coding Guidelines

  • From: "Marcus Overhagen" <ml@xxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Sun, 12 May 2002 22:10:02 +0200

"Jonas Sundstrom" <kirilla@xxxxxxxxx> wrote:

>I think the cases you mention are very different:
>
>1. internal library stuff
>2. exposed library stuff 
>3. member variables of (sub)classes, in app-space

No, they are not. On compile time, internal, but global library functions
will collide with functions implemented in an application using this libary.
if the application has a void foo(), and the lib also has a void foo() hidden
somewhere, this will give a linker error.

All variable names in the private section of a class can collide
with variable names in any sub class at compile time.

>Different problems/needs, different solutions.
Yes, but you really do not seem to understand which problems I 
tried to show in my original email.

>1 - the lib devs need to keep internal/external pieces separated
Yes, but elf exports every symbol (function name, class name or global 
variable),
it doesn't matter if it's in private functionality, or in those meant to be 
externelly visible.

>2 - avoid clashes between lib / app stuff   (app vs. lib dev)
Yes

>3 - app dev needs separation between globals, constant, 
>    member and local variables.
This is not a issue here.

>Is there a good tradeoffs between these different needs?
>Is there a standard with the "big picture"?
Please read my original email again.

Marcus 

Other related posts: