From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Decoded time accessors Date: Sun, 7 Jul 2019 18:25:29 -0400 Message-ID: References: <20190707214326.GD4053@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="15628"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 08 00:25:48 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkFbQ-0003yR-ED for ged-emacs-devel@m.gmane.org; Mon, 08 Jul 2019 00:25:48 +0200 Original-Received: from localhost ([::1]:37258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkFbP-0004ij-Dm for ged-emacs-devel@m.gmane.org; Sun, 07 Jul 2019 18:25:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54815) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkFbG-0004gg-E8 for emacs-devel@gnu.org; Sun, 07 Jul 2019 18:25:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkFbE-00053M-Fe for emacs-devel@gnu.org; Sun, 07 Jul 2019 18:25:38 -0400 Original-Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:46549) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkFbC-0004s9-En for emacs-devel@gnu.org; Sun, 07 Jul 2019 18:25:34 -0400 Original-Received: by mail-qk1-x72e.google.com with SMTP id r4so11813087qkm.13 for ; Sun, 07 Jul 2019 15:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=e0K7hm+FxMnUD+WwS2gZWNj2bOLZXZonp/1KS80/ZPg=; b=K+wparxJAZyfoN8276rLVBFKZdiLbYaLK8vKtb19UQck2Vn53ygNVo8uP9D/QNbb62 oC7E/MZWdb4NWuFotXkVubEkuPHU5uMDfoXzQPbnYGEsNd+KTq1Ai7j6vZfoJ5TgtM9D Y3SSKMdfSFny4I3an7Sd15S0lvnrG4OohX9OKPKwfbOd6NnvJLT4IB7w4/cESmRR5dGc xA56H6sBalCLdMWiqSyLZev5Q32HWy0dBEaxEPdcOvy2RbNWerscczMmIu/VWOHPGWNh KYdtze+csrfAP7Aa5IAYCdfvUH6p6E7roeGd4YRIq79jA8w0dt7g/VI2Byl116ZuIC6c vxVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=e0K7hm+FxMnUD+WwS2gZWNj2bOLZXZonp/1KS80/ZPg=; b=inknStYnMK74AfEf4201OlsP10R+s8TwWD7/GbuazluF7bAW2oMMM3dvDX6/gAumSU lCfCIySxn0f9OY2eqOJqfoXtfKtEXZJlU35SMI/WbISe9fm33NpQLcvv4XuAWXwrIzXC l/pAaND1iib2+SHgm/E16oiO3/WmDiCmjO3+Dqj91HEmR9ZHHzvWn0gO1V0aV/Ao3Sn9 Xk1t9MUZxQzocja2GC5ARmOUT1zAdL+S5fVGfI8Hx1jUUdSl7gib4dsHl7poOqrJTO6F Cnbf3d9R5xHzQSNzCM2IcN5HbZ7b5+cjvTGTeNxDanBrDjfDxTtYYkHJoHn0g7/CLtz8 bZvg== X-Gm-Message-State: APjAAAWSlUdHnN5QVHulsq+bACMQZ6DTjzs6krhA5g4qvrtZOFrqvTHM ZqDFVi08UFZ38TIxkUJoegIa6b4t X-Google-Smtp-Source: APXvYqyf+hDyrj6OqQu+iOn+OUqgWOQJmz6edVsV1D9uY/Up/bjrjNjuwOlnna+JKJWrkob3Wl7Uzw== X-Received: by 2002:a05:620a:15b3:: with SMTP id f19mr11570309qkk.314.1562538331119; Sun, 07 Jul 2019 15:25:31 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:f973:3492:737c:7cdc? ([2601:184:4180:66e7:f973:3492:737c:7cdc]) by smtp.googlemail.com with ESMTPSA id d20sm5082465qto.59.2019.07.07.15.25.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Jul 2019 15:25:30 -0700 (PDT) In-Reply-To: <20190707214326.GD4053@ACM> Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::72e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238401 Archived-At: 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.