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

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

Re: Setting the nth element of a list


From: bigfaceworm
Subject: Re: Setting the nth element of a list
Date: Fri, 5 Jun 2009 09:56:01 -0700 (PDT)
User-agent: G2/1.0

On Jun 5, 6:57 am, Nordlöw <per.nord...@gmail.com> wrote:
> I really believe such a function increases the readability of the code
> that uses it, don't you?
> What if I define it as a macro (defmacro) or inline (defsubst)?
> Doesn't that give the best of both worlds+
>
> /Nordlöw

In general, no.

Writing your own functions to increase "readability" decreases the
portability of code using those functions, in increases the effort
required to read such code (for a new person), and ultimately it leads
to bunches of little, disparate, libraries all doing the same thing
but with completely different nomenclature.  Once you learn and
understand 'setf, its meaning is incredibly clear, and adding layers
over that just obfuscates the code.

Using widely available, standard libraries (such as 'cl) is what leads
to more readable code.  Such libraries are the result of many years of
experience by people who know the language intimately.


TJ


reply via email to

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