Whatever the merits of local stack storage vs a heap which can get fragmented, you can't rely on being able to store entities of arbitrary size on it.
Is it really on the stack? If I declare an instance of an
object type as global variable, isn't that placed in the data section and not on the stack? So the stack limitations shouldn't hold for that?
On target embedded I use
object a lot, because its lightweigth and I don't use a memory manager, so
class wouldn't work. Just today I'm programming for a STM32.
For PC-programming I totally dropped using type
object because of some minor incompatibilities. But I should give it a try once more.