Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

libgeneralist

Name: Anonymous 2011-09-12 22:56

So, /prog/, I'm writing a general library in C, with the aim of being somewhat inspired by libraries such as glib, but far lighter and cleaner. So far, I have a linked list implementation and a Unicode string implementation (this is incomplete), totalling 670 SLOC. The build system is cmake, the code is fully documented with doxygen. Of course, the library is in its infancy and far from finished; what other things should I implement? Any data structures? OS abstractions?

Name: Anonymous 2011-09-13 0:05

>>9
I don't totally agree. A linked list with a proper memory manager with a freelist and whatnot is just fine, performance-wise.


>>12
only occasionally. That's the point of the overcommitting part. But dynamic arrays have problems with separation and composition. In a manually memory managed language, separation and composition aren't a good idea anyway, but, I mean, nobody would use a Lisp where cells were actually an abstraction over dynamic arrays. It would be horribly slow. Every call to car and cdr would have to break apart an array. Gross.

My point is that lists lend themselves really well to functional programming/recursion/automatic memory management. They are even, marginally, more optimized for those tasks.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List