Pre-Alpha CLC Standard Container API Proposal...

E

Eric Sosman

Chris Thomasson wrote On 10/24/07 17:44,:
[...]
My view is a little different: Every good programmer's
bag of tools will contain useful gadgetry for tasks the
language's built-in capabilities do not support well enough,
but will not contain silly tools that just duplicate what
the language already provides. Tools that don't add value
are, well, not valuable.

A linked-list library strikes me as a silly tool.


[...]

Why can't you use the simplistic linked-list api to build larger, more
complex data-structures?

You can. So can I, and I have (as I described in the
snipped portion). But the fact that complex things worth
packaging as library suites can be built from simpler
components does not imply that the components should also
be packaged that way.
 
R

Richard Bos

Eric Sosman said:
Richard Bos wrote On 10/24/07 09:27,:

My view is a little different: Every good programmer's
bag of tools will contain useful gadgetry for tasks the
language's built-in capabilities do not support well enough,
but will not contain silly tools that just duplicate what
the language already provides. Tools that don't add value
are, well, not valuable.
An API that offers
linked lists "with benefits" could be worth while, but just
replacing `while ((p = p->next) != NULL)' is not (and it's
difficult to divorce the "benefits" from the context in
which the API is used).

Actually, your view is not as different from mine as you think, since I
would include that in "a code library". That's why I specifically
included the word "code": if you can't paste it into your own code and
adapt it /instanter/, it's not flexible enough. For a simple linked
list, I, too, do not (usually) include separate functions for walking
it, though I do usually include ones for constructing and destructing
entries, and where useful, also one for creating a blank entry. But,
like you, not for walking the list.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top