2 ms·
Wonderful idea, but some of code I sampled is not what I would define as literate. For example, the singly linked list implemented in C has a linear time remove
by scott_s 19y ago
Wonderful idea, but some of code I sampled is not what I would define as literate. For example, the singly linked list implemented in C has a linear time remove operation. While this operation is inherently linear with a singly linked list (you must find the previous node), you're not required to provide it as part of the interface. Personally, I think you shouldn't provide inherently inefficient operations in the interface to a data structure. That a particular operation is not implemented should be a hint to users that this is not the data structure they are looking for. Yes, I'm nitpicking, but this is supposed to be literate code, not just correct code.
And yes, I know, it's a wiki, so I can contribute, not just criticize.