Skip to content
0:00 / 0:00

#object-orientedprogramming#templates#compile-timepolymorphism

Objects? No Thanks! - Wouter van Ooijen @ Meeting C++ 2014

Meeting Cpp

38K subscribers • 36 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Wouter van Ooijen
  • An opinion. It argues one side of a question engineers disagree on.

Advanced. Deep dive for people who know the field.

10K views11 years ago2 recommendations

Programming languagesSystems programmingC++Embedded systemsObject-oriented design

Wouter van Ooijen argues against using traditional objects in resource-constrained embedded systems, proposing template-based alternatives.

Objects? No Thanks! Wouter van Ooijen Meeting C++ 2014 Slides: meetingcpp.com/index.php/tv14/items/14.html

Why it's here

2 people recommend this

What people say. Recommended for understanding the trade-offs of object-oriented programming and templates in resource-constrained embedded C++.

u/Wouter-van-Ooijenin r/embedded • Recommends

On “Is using C++ singleton classes on atmega 2560 to abstract away port, pin and interrupt setup a good approach?”

For an explanation: [video or [video

u/Wouter-van-Ooijenin r/embedded • Recommends

On “Embedded C++ question regarding constructors”

…ke care that the objects stay around. For work that is time/size critical, I experiment with 'objects' that are in fact types (class or struct), and are passed as template parameters. This limits me to static relationships, but it eleminates all dangling reference problems, and the optimizer has full view of the call chains. A longer explanation: link to this video…

u/MSaeedYasinin r/embedded • Recommends

On “Future of embedded coding architecture”

Thanks for the "objects? No thanks" reference, I watched this video link to this video Even in that video, he mentions that for small MCU usually their compiler doesn't even support C++. But if it does, it might only support C++98 standard only and not the latest standards. But in any case, even he shows that assembly code generated by C was the smallest and we had to use compile time polymorphism using templates in C++ to achieve the same assembly code. Hence, proving my point that C++ dynamic polymorphism will generate less optimized code as compared to procedural C. Do you know any companies that are using compile time polymorphism with SOLID/Design patterns in their code base?