You do not specify all what is said in JSG (avoid namespace collision vs. 
Common API, for instance). Names for libraries and pins are already settled, as 
procedures, function, etc..

I vote for what is in JSG...

Seb

----- Message d'origine -----
De: Eur van Andel <[EMAIL PROTECTED]>
Env: mardi 14 octobre 2008 23:34
À: jallib <[email protected]>
Objet: [jallib] vote on namespace for procedures and functions

Hi

We need a vote about procedure names.

NB: names for libraries and pins are already settled, see:

Rules of thumb
Filenames, variables, procedures naming convention
Filenames
in:

http://code.google.com/p/jallib/wiki/JallibStyleGuide


I see several possibilities:

--------------------------------------------------------------------------------------
1) device_function()

examples:

hd44780_clear(), hd44780_line1, hd44780'put()
t6603_read_co2(), t6603_read_height()
tc77_read_celsius(), tc77_read_fahrenheit
--------------------------------------------------------------------------------------
2) function_device()

examples:

clear_lcd_hd44780(), lcd_set_cursor_hd44780(), lcd_hd44780'put()
read_co2_t6603(), read_height_t6603()
read_celsius_tc77(), read_fahrenheit_tc77()
--------------------------------------------------------------------------------------
3) function()

examples:

clear_lcd(), lcd_set_cursor(), lcd'put()
read_co2(), read_height()
read_celsius(), read_fahrenheit()
--------------------------------------------------------------------------------------


1) pro: no namespace collision
1) con: not too clear if you don't know the IC numbers, long, oldskool


2) pro: no namespace collision, can be changed to another device by replacing 
chip number
2) con: long

3) pro: short, simple
3) con: namespace collision, unclear which external device is used


We could cheat and use both 2 and 3: I like put/get functions for lcd and 
serial. And yes, you will need to hack the library if you want to use two lcds 
and rename one putfunction "lcd2" for instance. 

My vote: 2) with putfunctions (and only put/get functions) like 3). 

Your votes please. 

---
ir EE van Andel [EMAIL PROTECTED] http://www.fiwihex.nl
Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
tel+31-546-491106 fax+31-546-491107




--~--~---------~--~----~------------~-------~--~----~
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