[Top][All Lists]

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

Re: Decoded time accessors

From: Clément Pit-Claudel
Subject: Re: Decoded time accessors
Date: Sun, 7 Jul 2019 18:25:29 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2

On 2019-07-07 17:43, Alan Mackenzie wrote:
> We've coped now with (nth 8 state) (for the starting position of a
> string or comment) for decades now without any problems.  The sort of
> "readability hack" proposed, as it is steadily proliferated, makes the
> entry barrier for new Elisp programmers steadily higher.  To use it is
> one extra thing which has to be learned, or looked up.

FWIW, I disagree; I find that these accessor functions actually help.  And I 
think I count as fairly new, since I've been writing ELisp for just 5 years. 

The nice part about these accessor functions is that I only have to look them 
up once (and often not even once, since the name gives a precise enough idea of 
what they do).  But after 5 years, I still can't remember what each part of 
syntax-ppss means (and I end up defining my own aliases in each new package).

Besides, if I want detailed documentation, having to click on one more link to 
get to the docstring of file-attributes really isn't much of a problem, as far 
as I'm concerned.  And if a piece of code does (nth 3 attrs), how am I supposed 
to know that I have to look at the documentation of file-attributes to know 
what is in attrs?  If attrs is an argument of the current function I need to 
read the docstring, and if there isn't one or it doesn't say then I have to 
find the callers.  That's a lot harder than if the code used an accessor 
function on attrs.


reply via email to

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