Rules of thumbFilenames, variables, procedures naming conventionFilenames
---
ir EE van Andel e...@fiwihex.nl http://www.fiwihex.nl
Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
tel+31-546-491106 fax+31-546-491107
---
ir EE van Andel e...@fiwihex.nl http://www.fiwihex.nl
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...
procedures and functions must be named as:* <function>_<whatever> if you want to have a common API
All external names (of global variables, constants, procedures and functions available to application programs) must start with a prefix unique to the library.
---
ir EE van Andel e...@fiwihex.nl http://www.fiwihex.nl
The JSG is not consistent:procedures and functions must be named as:* <function>_<whatever> if you want to have a common APIis not the same as:All external names (of global variables, constants, procedures and functions available to application programs) must start with a prefix unique to the library.because "function" can't be (and shouldn't be) specific to a library
The JSG is not consistent:procedures and functions must be named as:* <function>_<whatever> if you want to have a common APIis not the same as:All external names (of global variables, constants, procedures and functions available to application programs) must start with a prefix unique to the library.because "function" can't be (and shouldn't be) specific to a library
If all vars, consts, procs, funcs in a library start with "blabla_", don't we have a prefix unique to the library ?
As I said a previous post today, the main confusion seems to come from the meaning of "function". You consider function as "get", "read", "write", etc... I consider function as "lcd", "temperature", "i2c", "serial", etc... Maybe, for what I mean, "device_family" should be better.
About examples: if device_function() gives hd44780_clear(), then function_device() should give clear_hd44780(), not clear_lcd_hd44780()
If you go with 2), how will you deal with common API ? Since you put the device (hd44780), what will you do when you'll change the LCD type (st7036) ? Isn't this why we don't use "device", but what we call "function" (lcd) and may call "device_family" or something else. I understand there's a confusion about the meaning of "function", better reserved for proc/func name, such as "read", "write", "print", "move_motor_forward", etc...