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

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

Re: iterating over (nonascii) chars


From: Michael Heerdegen
Subject: Re: iterating over (nonascii) chars
Date: Mon, 14 Oct 2013 22:48:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Rustom Mody <rustompmody@gmail.com> writes:

> In perl-mode.el I find things like
>
>
>     (modify-syntax-entry ?* "." st)
>     (modify-syntax-entry ?+ "." st)
>     (modify-syntax-entry ?- "." st)
>     (modify-syntax-entry ?/ "." st)
>     (modify-syntax-entry ?< "." st)
>     (modify-syntax-entry ?= "." st)
>     (modify-syntax-entry ?> "." st)
>
>
> Any reason why its not written as follows?
>
> (dolist (v (string-to-list "*+-/<=>")) 
>  (modify-syntax-entry v "." st))

Probably, no.  Many people prefer the first version wrt readability.
While galloping through the code the first version is easier to parse
for your eyes, while the second version is shorter, of course.  Use
whatever suits your style of thinking and coding.


Regards,

Michael.




reply via email to

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