2 ms·
> 1- Everyone needs to create their ALLOCATE macro This is not an issue at all. It's one (!!) line. And the (huge) advantage is: Everybody can create their own
by jstimpfle 6y ago
> 1- Everyone needs to create their ALLOCATE macro
This is not an issue at all. It's one (!!) line. And the (huge) advantage is: Everybody can create their own allocation macros. Not all allocations are born equal: Some need specific contexts or arenas/pools where to allocate from, some want a specific alignment, some want zeroed memory...
And again, you don't even need this macro, it's just cosmetic. Better invest in some structure that reduces the number of required allocations to a small constant (per type or subsystem).
> and not everyone does it right
This is like saying, don't write code because not everyone is doing it right. This is almost the simplest type of code you can imagine.
> 2 - Actually it fails with certain kinds of type given as parameter
Which ones, then?
---
For the rest, trying to de-flame this and not to reply, and maybe be actually productive for an hour this afternoon :-)
- pjmlp 6y agoI wear the scars from comp.lang.c with pride, old songs never go out of tune apparently.