Sorry for resurrecting this thread, but I am not ready to lay this behind just yet.
I’ve been around in the Software troubleshooting/syntax&programs sections, and I found that in several cases their problems could’ve been supressed, if not solved, by using different datatype practices.
One topic that is pretty hot on the forum right now is the use of other processors with more ram/eeprom and such. [I do not argue that this is not an interesting topic] Almost all arrays I’ve seen uses ints when they could’ve used byte, this results in twice as much ram being used.
This quickly adds up when using multidimentional arrays, or a predefined sinetable.
I’m pretty sure that the use of ints can be traced to the examples and the returntypes of arduino core functions.
Am I the only one who would like to see the arduino being a bit more economic concerning datatype usage.
I think the community could benefit from some kind of standardisation regarding syntax used in libraries that are released into the public domain of arduino.
This would help users take advantage of usercreated libraries.
An example would be a set of rules of what do comment in sourcecodes, and if/how to prefix variables regarding datatypes or accessability. (int,short,public,private)
Is redefining the arduino datatype practices a lost cause?
I would be more than happy to be a part of such a reform. Either by forming a comitee or by creating a survey.
As a PostScriptum I would like to add that I do understand and I am aware of that the goals of such a project would be to make arduino even more userfriendly. And I would argue that by selecting the right datatype, the compiler becomes much more helpful. You can not set a digital pin to -1 if using byte, but you can try (and fail) if using ints.