> > I can imagine this is less relevant for temperature sensors, because > > the interaction is less complex: each sensor is read at one place in > > the program and the result is taken for processing. So switching > > library only requires limited changes in the main program. > > These are the limited changes I mean: a search-n-replace for > "hd44780", to replace with "serial", for instance. > This way the namespaces do not collide, everything is clear and still > easy to change. > And yes, you can use both at the same time.
I'm not sure to understand this "search-n-replace" thing, I assume this is about program, not libraries. What is sure is, if you build a library on top of another one, you can't "search-n-replace" anymore... > With the function first, the purpose is also clear, to newbies as > well. It goes a long way to defining a common API for all libs, like: > > read_temperature_celsius_device() > read_temperature_fahrenheit_device() > send_status_byte_device() > read_status_byte_device() That is ? You want function_device() instead of device_function() ? > > And, no this is not contrary to pin names as: > > TC77_SIO and HD44780_EN, DS180_DATA > > since pin names are used much more on a schematic level and only > declared once. > > And yes, the NAME of the library itself should be: > > lcd_hd44780_4.jal (as it already is, but there's nothing in the > Style Guide) > temperature_tc77.jal > co2_t6603.jal > > If we agree, Seb should put this in the style guide too. There are already things about namespaces I've added a few days ago (see "Filenames, variables, procedures naming convention"). I think what you say here is already in it. Seb -- Sébastien LELONG http://www.sirloon.net http://sirbot.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
