2009/3/1 Sebastien Lelong <[email protected]>:
> Hi guys,
>
> My thoughts about this "private" flagged procedures/vars is... bad idea :)
>
> Let me explain. Python is the same: you don't have really private stuff, the
> coder decide whether it's private or not by adding "_" (or, "__"). What
> seems to be private for you may not be private for others. More, having a
> "_" tells user no to use this func, it's for internal use, but what if you
> decide, after some thoughs, it's worth exposing it as public ? You need to
> change API. Which can be a pain... I used to design things with private and
> public stuff, but at the end, it's always the same: what I considered
> private by the time I wrote it has no purpose on still being private now. I
> prefer let users be responsible and not limiting what they can do, or
> sending warnings like "no, don't use this function, it's for private use
> only !!!".
I see your point. However, I thinkt the alternative is worse. If we
don't give an indication that something is not concidered to be the
main api, users just get something working with the procedures at hand
and continue from there - even if there was an good alternative.
And the same for us (at least me ;). An underscore tells us we should
look where and how it is used.

IMHO users can use 'private' functions, as long as they realise there
relationship with other functions is more complex and the functions
have a greater chance of changing then the main api.
And for filenames: users should first look if there is an include
without underscore that suits their needs. And if they have reason to,
there is no restriction on using _ includes. But maybe, it is better
they join us ;)

> BTW, in i2c lib, there are "private" variables that shouldn't be...
>
> const word _i2c_bus_speed = 4
> const bit _i2c_level = true
Right, we should change them!

> About 80 chars, I would also prefer not having restrictions: screen nowadays
> can display more than 80 chars :)
I'm not suggesting we should stay within 80 chars, just to provide a
standard point to end *dashed lines*. I've seen many from 58 to 85 and
that looks sloppy.

Joep

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to