When writing reusable code, I like to be consistent and use standards. For C++, there are many flavours out there.
I've been looking around for guidance on writing modern C++ code, with templates. That's when I bumped into the µOS naming standards. µOS is a C++ RTOS, maintained by Liviu Ionescu. He 's been very active on this community for a long time, when this forum was used to support the Eclipse Embedded CDT plugin.
He managed to compile a reasonable naming convention set. Pragmatic, not pedantic.
A number of naming proposals try to cover all, or are detailed. I like a standard that handles the conceptual level. To my taste, the µOS standard has a good balance.
It's more brief than many other options out there, but I haven't found a miss. And I like how my code "sounds" when applying the principles.
When writing code, check it out. I've recently designed a C++ library, that (I hope) adheres to that standard. It helps me to stay consistent, and I hope it helps the user to understand my library's API.
that's all :)
Link to related posts.
Top Comments