Problem
The library mixes two interchangeable spellings for the same concepts. Not a bug, but for teaching material that students read as a style exemplar, it should be consistent.
boolean vs bool
boolean (Arduino typedef for uint8_t): FileUtils.hpp, ScrollingLineGraph.hpp, ScrollingLineGraphMultiValue.hpp, examples
bool (standard C++): Button.hpp, Shape.hpp, MovingAverageFilter.hpp
NULL vs nullptr
NULL is used throughout (e.g. MovingAverageFilter.hpp, GraphLine.hpp, FileUtils.hpp), even though the codebase already relies on C++11 (delegating constructors, = delete), so nullptr is available.
Proposed work
Pick one of each and apply repo-wide. Recommendation:
- Standardize on
bool (standard C++; boolean is just an Arduino alias).
- Standardize on
nullptr (type-safe, modern, and consistent with the C++11 features already in use).
Small, mechanical change; worth doing in one sweep so it reads cleanly for students.
Problem
The library mixes two interchangeable spellings for the same concepts. Not a bug, but for teaching material that students read as a style exemplar, it should be consistent.
booleanvsboolboolean(Arduino typedef foruint8_t):FileUtils.hpp,ScrollingLineGraph.hpp,ScrollingLineGraphMultiValue.hpp, examplesbool(standard C++):Button.hpp,Shape.hpp,MovingAverageFilter.hppNULLvsnullptrNULLis used throughout (e.g.MovingAverageFilter.hpp,GraphLine.hpp,FileUtils.hpp), even though the codebase already relies on C++11 (delegating constructors,= delete), sonullptris available.Proposed work
Pick one of each and apply repo-wide. Recommendation:
bool(standard C++;booleanis just an Arduino alias).nullptr(type-safe, modern, and consistent with the C++11 features already in use).Small, mechanical change; worth doing in one sweep so it reads cleanly for students.