emacs-devel
[Top][All Lists]
Advanced

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

Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorth


From: João Távora
Subject: Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)
Date: Tue, 28 Sep 2021 16:20:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 28.09.2021 15:49, Phil Sainty wrote:
>> Allowing things to not be what they seem adds an additional cognitive
>> load to *everything* you look at, because everything has the potential
>> to not be what it seems, and so I think this makes codebases harder to
>> read and understand, generally.
>
> Perhaps we could alleviate this by requiring that shorthands end with
> a particular character (like '/' or ':'), so that if you see it in a
> name, it's probably a shorthand.

I think that's a dreadful idea.

The point of shorthands is aiding typing and manage namespacing
etiquette succesfully.  Your proposal would single-handedly destroy the
ability to import s.el and s.el -using libraries with minimal changes,
for example, which was one of the main motivations for writing it.

If however, you substritute "requiring shorthands to end" with "visually
annotating" shorthands, such as with font-lock, for example, then I
think that's a pretty good idea that should solve the "cognitive load"
bit.  We already do that with macros, functions, variables, uninterned
symbols, why not shorthands, indeed.  It's super consistent.

João



reply via email to

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