-
I should start by saying I am relatively new to Arduino but have decades of experience with C. My question is why put function definitions into RollingClockLogic.h I have seen this in other places in Arduino projects but coming from a C background it would seem more appropriate to put the definitions in a *.cpp file and declarations (function prototypes) in a *.h file. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The pattern is known as a "header-only library". You will not find it difficult to find heated discussions about it, with passionate supporters and detractors. I think there must be something about the Arduino culture or toolchain that encourages this approach, because it is something I have only ever seen in the Arduino ecosystem. |
Beta Was this translation helpful? Give feedback.
The pattern is known as a "header-only library". You will not find it difficult to find heated discussions about it, with passionate supporters and detractors. I think there must be something about the Arduino culture or toolchain that encourages this approach, because it is something I have only ever seen in the Arduino ecosystem.