3 ms·
Agony might be a bit much, and i'm not trying to defend C because this is one of the strong reasons for using C++/STL... But, generally one should just reach f
by StillBored 3y ago
Agony might be a bit much, and i'm not trying to defend C because this is one of the strong reasons for using C++/STL...
But, generally one should just reach for a library first before doing a complex data structure regardless of language. And for example, the linux kernel does a fine job of doing some fairly complex data structures in a reusable way with little more than the macro processor and sometimes a support module. In a way the ease of writing linked lists/etc are why there are so many differing implementations. So, if your application is GPL, just steal the kernel functions, they are reasonably well optimized, and tend to be largely debugged, are standalone, etc.