help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Easy to add with push but not to the end of a list


From: Emanuel Berg
Subject: Re: Easy to add with push but not to the end of a list
Date: Tue, 29 Nov 2022 06:32:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

tomas wrote:

>> The bad idea comment disregards necessity...
>
> Q "But I /want/ to hit this nail into the wall with a spoon!"
>
> A "You can try. But please, do it in your living room. And
>    oh, with your own spoon"
>
> Programming is somewhere between engineering and craft.
> In these realms, you usually try to think about what tools
> are appropriate for a job.
>
> Singly linked lists are a tool. They are simple,
> lightweight, and appropriate for keeping things in sequence,
> and for adding things at the front. Not at the end.

Yes, but there is, for example, `last'.

Why do we have that if that is O(n) and not O(1) as is `car'?

Why car _and_ last while at the same time `push' _and not_ "push-last"?

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]