Skip to content

Standardize bool vs boolean and NULL vs nullptr across the library #6

Description

@jonfroehlich

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions