News for hackers. Stuff that matters.
Re:Object-oriented techniques in C by rbalsdon on Tuesday September 22, 2015 @08:02PM (#10262565)
I've found that, in the embedded world at least, the overhead this adds (in terms of flash/rom and ram) can be fatal. That said, there are some more implementations of this here if anyone is curious: https://github.com/ryanbalsdon/libr
Re:Object-oriented techniques in C by deathanatos on Wednesday September 23, 2015 @02:28AM (#10263594)
> the overhead this adds (in terms of flash/rom and ram) can be fatal.

I know you list the resources, but how does this approach add overhead? (how does it use those resources more than a "C" approach would?) Most of the constructs in C++ only cost anything if you use them, so you only pay if you need the feature; further, the runtime costs of most C++ features are pretty much exactly what's required for that feature… so if you were writing C, and you needed the same functionality, how would you avoid paying the same cost?