From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Decoded time accessors
Date: Sun, 7 Jul 2019 18:25:29 -0400 [thread overview]
Message-ID: <c2474eed-05f7-1774-1a4c-b8092e6ecc31@gmail.com> (raw)
In-Reply-To: <20190707214326.GD4053@ACM>
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.
Clément.
next prev parent reply other threads:[~2019-07-07 22:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-07 19:33 Decoded time accessors Lars Ingebrigtsen
2019-07-07 19:52 ` Paul Eggert
2019-07-07 20:09 ` Lars Ingebrigtsen
2019-07-07 21:43 ` Alan Mackenzie
2019-07-07 22:20 ` Lars Ingebrigtsen
2019-07-07 22:25 ` Clément Pit-Claudel [this message]
2019-07-08 14:41 ` Eli Zaretskii
2019-07-09 0:12 ` Accessor functions vs nth (WAS: Decoded time accessors) Noam Postavsky
2019-07-10 10:02 ` João Távora
2019-07-29 12:29 ` Decoded time accessors Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c2474eed-05f7-1774-1a4c-b8092e6ecc31@gmail.com \
--to=cpitclaudel@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.