On 5/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
On Fri, May 26, 2006 at 08:29:58AM -0500, Marco Peereboom wrote:
> Static has it's uses however for some
> reason the (open source) world at large seem not to understand
> what they are. Same is true with typedef, it has its uses too but
> mostly it is abused.
What are some examples of abuse/misuse of typedef? (That's an
honest question, not trolling.)
well everything was already said within this very thread. RTFA in case
you've missed it.
> I bet you have never wasted days finding a non-bug because of
> static.
So how do you specify that a function should be visible only to the
local compilation unit? Or, how do you keep others from using your
locally-scoped (but not declared static) function in a global
context?
why would you even want that (moreover in opensource)? hide for what reason?
I've seen situations where someone saw a function that was not
declared static, but clearly intended to have only local visibility,
and someone went off and prototyped that function in some other
module so they could use it. (Then again, even using 'static'
probably wouldn't have solved the problem---that person would have
just deleted the keyword!)
well, as i asked before, i think it is not like OpenBSD developers
consider hiding functions from other developers (and effectively from
themselves). this increase of obscurity has little to go with "use the
source Luke"...
Just curious!
Thanks,
Matt