News for hackers. Stuff that matters.
Re:C, The Beautiful Language by sid0 on Tuesday March 15, 2011 @02:48AM (#2326354)
Exactly, and C is the worst offender for boilerplate code. There isn't even a list abstraction! It's surprising that there's an array abstraction and that people aren't just forced to use pointer arithmetic.
Re:C, The Beautiful Language by geoka9 on Tuesday March 15, 2011 @07:45AM (#2326980)
This is not fair. C was (and still is) intended for situations where writing your own list abstractions is the right thing to do.

Unlike lists, the array abstraction doesn't cost anything, as it's just straightforward pointer arithmetic underneath. This is why it is in the language.

Re:C, The Beautiful Language by Peaker on Tuesday March 15, 2011 @08:50AM (#2327184)
There are list abstractions in libraries.

See the Linux kernel's list.h for a very nice and generic linked-list implementation.