unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Phil Sainty <psainty@orcon.net.nz>
To: "João Távora" <joaotavora@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)
Date: Wed, 29 Sep 2021 01:49:59 +1300	[thread overview]
Message-ID: <07cf50ddddb5a9556aa94201a7ac88c9@webmail.orcon.net.nz> (raw)
In-Reply-To: <87ee99dv34.fsf@gmail.com>

On 2021-09-28 20:21, João Távora wrote:
> So it sounds like you're arguing against namespaces in general,

Yes, I would vote against adding this to elisp.


> and you're right, they have disadvantages, in any language.
> But the advantages are immense.

Are they?  I don't see how they add anything at all of genuine worth.

(FWIW I'm sorry that this sounds harsh, as I'm certain that a lot of
effort has gone into this.  I just have really strong misgivings about
the feature.)

I agree that they make code a little nicer to write for the author
who knows what everything is.  I think this is an *extremely* minor
benefit which everyone can easily manage without (as they have done
for decades); and AFAICS it is the only benefit, and so I don't see
how it is worth all of the trouble that comes with it.

I firmly disagree with the notion that it makes code easier to read
for other people.  Other people actually now have to mentally account
for the fact that every symbol they see might not actually exist by
that name.  The manual even talked about the ability for different
people to use different shorthands for the same library, so a symbol
might actually have *many* names in the codebase.  This makes things
harder.

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.

Libraries that you might actually be familiar with can now appear in
an entirely unfamiliar guise, meaning that extra mental effort is
needed to figure out what is going on in situations which you would
otherwise have immediately understood.

It makes it harder for users to share code because, even if you know
which libraries are used, copied and pasted code can now be completely
broken without knowledge of the magic file-local variable.

 From what I've seen it doesn't seem that the shorthand symbols even
exist (they are translated at read time), so if someone reads some
shorthand code and tries to look up the symbols they see, will they
find them?  If they C-h v and use TAB completion for the prefix they
are seeing in the code, will they see all the completions?  If so,
will that work in all buffers, in all locations?  If they get to the
help buffer and they try another look-up, will it then fail?  Or if
they simply have split windows and are reading code from the other
window?  What if different libraries specify the same shorthand for
different dependencies?  Can people only look up certain symbols
from certain places?

(I've just compiled from master to test some of this, and the answer
seems to be that it's impossible to look up the documentation for the
code you can actually see; unless you're in the buffer and asking
about the symbol at point, in which case it figures it out.  Again,
this is making things harder for the reader, not easier.  We have gone
from "if you can see it you can look it up" to "you can only look it
up if you are pointing directly at it, because it isn't what it says
it is".)


> To organize complex problems utilizing many libraries, I cannot
> imagine a decent language that does not have them.

How do namespaces help with that?  Without namespaces you still have
access to all of the same functionality from all of those many
libraries, to organise your complex problem.

Furthermore Emacs Lisp is not other languages, and Emacs is unusual.
It combines a very large amount of global state (which most programs
do not do) with dynamic binding (which most languages do not have).
Other languages are more likely to restrict the global state, and
share things in a far more limited manner.  In Emacs, global symbols
are used pervasively between libraries in a fashion that doesn't
happen in most software; and if the same symbol does not always have
the same name, I think that's a bad thing.

Surely "other languages have this" isn't a reason to add something to
elisp unless there is a clear net win to doing so, and all I'm seeing
are net losses.  What are the advantages that I'm not seeing which are
so immense that they make all the problems worthwhile?


-Phil

p.s. I know you wrote more, but this was already a long reply.
However, I don't think the informal "namespacing" of people's names
in a discussion is an analogue of the formal expressions needed by a
programming language; and I couldn't figure out what the "expressive
power" of shorthands might be.




  reply	other threads:[~2021-09-28 12:49 UTC|newest]

Thread overview: 332+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  0:38 Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master) Phil Sainty
2021-09-28  5:43 ` Lars Ingebrigtsen
2021-09-28  7:26   ` João Távora
2021-09-30  6:03   ` Richard Stallman
2021-09-30  8:20     ` Gregory Heytings
2021-09-30 10:31       ` André A. Gomes
2021-09-30 10:54         ` Alan Mackenzie
2021-09-30 11:18           ` João Távora
2021-09-30 11:40             ` André A. Gomes
2021-09-30 16:58             ` Alan Mackenzie
2021-09-30 20:25               ` João Távora
2021-10-01  3:01                 ` Stefan Monnier
2021-09-30 11:30           ` André A. Gomes
2021-09-30 17:37             ` Alan Mackenzie
2021-09-30 11:46         ` Gregory Heytings
2021-09-30 12:41           ` João Távora
2021-09-30 13:00             ` Tomas Hlavaty
2021-09-30 13:26               ` João Távora
2021-09-30 14:26                 ` Tomas Hlavaty
2021-09-30 14:57                   ` João Távora
2021-09-30 15:50                     ` Tomas Hlavaty
2021-09-30 16:02                       ` João Távora
2021-09-30 17:58                         ` Tomas Hlavaty
2021-09-30 23:30                           ` João Távora
2021-10-04 15:29                   ` André A. Gomes
2021-09-30 13:18             ` Gregory Heytings
2021-09-30 13:31               ` João Távora
2021-09-30 13:41                 ` Gregory Heytings
2021-09-30 16:23             ` [External] : " Drew Adams
2021-09-30 17:19               ` João Távora
2021-10-01  1:20                 ` Michael Heerdegen
2021-09-30 22:10               ` Michael Heerdegen
2021-09-30 22:22                 ` A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)) João Távora
2021-09-30 23:23                   ` Michael Heerdegen
2021-09-30 23:38                     ` João Távora
2021-10-01  1:17                       ` Michael Heerdegen
2021-10-01  7:02                       ` tomas
2021-10-01 13:15                         ` João Távora
2021-10-01 13:53                           ` tomas
2021-10-01 14:30                           ` Dmitry Gutov
2021-10-01 14:40                             ` João Távora
2021-10-01 15:48                               ` Dmitry Gutov
2021-10-01 16:05                                 ` João Távora
2021-10-01 16:11                                   ` João Távora
2021-10-01 16:41                                     ` João Távora
2021-10-01 23:17                                       ` Michael Heerdegen
2021-10-02  1:14                                       ` Dmitry Gutov
2021-10-02  1:46                                         ` João Távora
2021-10-02  2:13                                           ` Dmitry Gutov
2021-10-04 15:57                                           ` André A. Gomes
2021-10-02  1:05                                   ` Dmitry Gutov
2021-10-02  1:30                                     ` João Távora
2021-10-02  1:43                                       ` Dmitry Gutov
2021-10-02  2:05                                         ` João Távora
2021-10-02  2:24                                           ` Dmitry Gutov
2021-10-02  8:39                                           ` Adam Porter
2021-10-02  8:36                                 ` Adam Porter
2021-10-02 12:16                                   ` Dmitry Gutov
2021-10-02 23:18                                 ` Richard Stallman
2021-10-03 21:17                                   ` Gregory Heytings
2021-10-07 22:21                                     ` Richard Stallman
2021-10-18 21:13                                       ` Gregory Heytings
2021-10-18 21:22                                       ` Gregory Heytings
2021-10-20  6:45                                         ` Richard Stallman
2021-10-20  8:00                                           ` Gregory Heytings
2021-10-23 23:26                                             ` Richard Stallman
2021-10-01 22:58                               ` Gregory Heytings
2021-10-01 23:03                                 ` João Távora
2021-10-02  8:50                                   ` Gregory Heytings
2021-10-02 10:29                                     ` João Távora
2021-10-02 11:57                                       ` Gregory Heytings
2021-10-02 12:44                                         ` João Távora
2021-10-02 14:50                                           ` João Távora
2021-10-02 15:01                                           ` Gregory Heytings
2021-10-02 15:22                                             ` Stefan Kangas
2021-10-02 15:33                                               ` But then what are namespaces ? (was: A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master))) João Távora
2021-10-02 19:42                                                 ` Gregory Heytings
2021-10-02 19:59                                                   ` But then what are namespaces ? Stefan Monnier
2021-10-02 20:41                                                     ` Gregory Heytings
2021-10-02 21:05                                                       ` Stefan Monnier
2021-10-02 21:09                                                         ` João Távora
2021-10-02 21:14                                                           ` Stefan Monnier
2021-10-02 22:41                                                             ` João Távora
2021-10-02 22:49                                                               ` João Távora
2021-10-02 23:31                                                               ` Stefan Monnier
2021-10-03 21:47                                                         ` Gregory Heytings
2021-10-02 20:00                                                   ` But then what are namespaces ? (was: A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master))) João Távora
2021-10-02 20:41                                                     ` Gregory Heytings
2021-10-02 20:46                                                       ` João Távora
2021-10-03  1:15                                                   ` [External] : " Drew Adams
2021-10-02 15:25                                             ` A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)) João Távora
2021-10-02 16:08                                               ` Gregory Heytings
2021-10-01 22:58                           ` Gregory Heytings
2021-10-01 23:10                             ` João Távora
2021-10-02  9:03                               ` Gregory Heytings
2021-10-02 10:25                                 ` João Távora
2021-10-01 23:04                         ` Michael Heerdegen
2021-09-30 12:34         ` Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master) Tomas Hlavaty
2021-09-28  6:25 ` Eli Zaretskii
2021-09-28  7:41   ` João Távora
2021-09-28  8:04     ` Eli Zaretskii
2021-09-28  8:07     ` Helmut Eller
2021-10-02  1:06       ` João Távora
2021-09-28 12:40   ` Stefan Monnier
2021-09-28 15:28     ` João Távora
2021-09-28 19:21       ` Stefan Monnier
2021-09-28 17:25   ` Alan Mackenzie
2021-09-28 18:25     ` Eli Zaretskii
2021-09-28 19:05       ` Alan Mackenzie
2021-09-28 19:29         ` Eli Zaretskii
2021-09-30 12:23           ` Phil Sainty
2021-09-30 12:28             ` Gregory Heytings
2021-09-30 12:29               ` Gregory Heytings
2021-09-30 12:44             ` Joost Kremers
2021-09-30 13:18               ` Adam Porter
2021-10-01  0:11                 ` Stefan Kangas
2021-09-30 12:52             ` Tomas Hlavaty
2021-09-30 12:55               ` João Távora
2021-09-30 13:49                 ` Tomas Hlavaty
2021-09-30 13:17             ` Lars Ingebrigtsen
2021-10-01  0:21               ` João Távora
2021-09-30 14:12             ` Eli Zaretskii
2021-09-30 14:27               ` João Távora
2021-09-30 22:50               ` Phil Sainty
2021-10-01  0:44                 ` Stefan Kangas
2021-10-01  7:06                   ` Lars Ingebrigtsen
2021-10-01  7:24                     ` João Távora
2021-10-01 10:10                       ` Eli Zaretskii
2021-10-01  6:09                 ` Eli Zaretskii
2021-10-01 12:24                   ` Phil Sainty
2021-10-01 13:00                     ` Eli Zaretskii
2021-10-02  0:28                       ` Phil Sainty
2021-10-02  6:45                         ` Eli Zaretskii
2021-10-02  7:44                           ` Phil Sainty
2021-10-02  8:53                             ` Eli Zaretskii
2021-10-02 10:52                             ` João Távora
2021-10-04  0:12                               ` Richard Stallman
2021-10-04  0:16                               ` Richard Stallman
2021-10-04 13:09                                 ` Gregory Heytings
2021-10-04 15:44                                 ` João Távora
2021-10-04 16:51                                   ` Eli Zaretskii
2021-10-04 17:43                                     ` João Távora
2021-10-04 17:51                                       ` Eli Zaretskii
2021-10-04 18:34                                   ` Gregory Heytings
2021-10-04 19:15                                     ` João Távora
2021-10-04 19:30                                       ` Gregory Heytings
2021-10-05 21:20                                         ` Richard Stallman
2021-10-06 13:12                                         ` João Távora
2021-10-05 21:20                                   ` Richard Stallman
2021-10-05 21:20                                   ` Richard Stallman
2021-10-05 22:07                                     ` João Távora
2021-10-05 22:15                                       ` Stefan Monnier
2021-10-06 11:28                                         ` João Távora
2021-10-06 12:21                                           ` Stefan Monnier
2021-10-06 12:30                                             ` João Távora
2021-10-06 12:46                                               ` Stefan Monnier
2021-10-06 13:16                                                 ` João Távora
2021-10-06 16:23                                                   ` João Távora
2021-10-06 20:00                                                     ` Stefan Monnier
2021-10-06 21:10                                                       ` João Távora
2021-10-06 21:39                                                         ` Stefan Monnier
2021-10-10 21:09                                         ` Dmitry Gutov
2021-10-07 22:21                                       ` Richard Stallman
2021-10-07 22:24                                         ` João Távora
2021-10-08  6:08                                           ` Eli Zaretskii
2021-10-08 12:58                                             ` Stefan Monnier
2021-10-08 13:22                                               ` Eli Zaretskii
2021-10-10 21:06                                                 ` Dmitry Gutov
2021-10-10 21:18                                                   ` João Távora
2021-10-08 14:16                                               ` João Távora
2021-10-08 15:55                                                 ` Stefan Monnier
2021-10-08 17:34                                                   ` Eli Zaretskii
2021-10-08 18:16                                                     ` Stefan Monnier
2021-10-08 18:51                                                       ` Eli Zaretskii
2021-10-08 23:43                                                   ` João Távora
2021-10-01 22:38             ` Richard Stallman
2021-10-01 22:41               ` João Távora
2021-10-01 22:52               ` João Távora
2021-10-01 23:52               ` Phil Sainty
2021-10-02  1:38               ` T.V Raman
2021-09-28 19:30         ` Dmitry Gutov
2021-09-28 18:38     ` Stefan Monnier
2021-09-28 19:14       ` Alan Mackenzie
2021-09-28 19:22         ` Eli Zaretskii
2021-09-28 19:31           ` Alan Mackenzie
2021-09-28 19:41             ` Eli Zaretskii
2021-09-30 22:10         ` Richard Stallman
2021-09-30 23:59           ` Tomas Hlavaty
2021-09-28  7:21 ` João Távora
2021-09-28 12:49   ` Phil Sainty [this message]
2021-09-28 13:08     ` Dmitry Gutov
2021-09-28 14:04       ` Gregory Heytings
2021-09-28 15:01         ` Adam Porter
2021-09-28 15:20       ` João Távora
2021-09-28 19:23         ` Gregory Heytings
2021-09-28 15:15     ` João Távora
2021-09-30  6:06     ` Richard Stallman
2021-10-05  5:57       ` Elisp LSP Server Ag Ibragimov
2021-10-05  6:38         ` Po Lu
2021-10-05  9:50           ` Philip Kaludercic
2021-10-05 11:27             ` Po Lu
2021-10-05 11:46               ` Philip Kaludercic
2021-10-06 20:57                 ` Richard Stallman
2021-10-06 21:22                   ` Philip Kaludercic
2021-10-06 21:44                     ` Stefan Monnier
2021-10-07 22:27                     ` Richard Stallman
2021-10-07  0:49                   ` Po Lu
2021-10-10 12:48                     ` Ag Ibragimov
2021-10-10 14:19                       ` Daniel Martín
2021-10-10 16:49                         ` Philip Kaludercic
2021-10-10 19:25                           ` Daniel Martín
2021-10-11  7:44                         ` Po Lu
2021-10-11 21:15                           ` Richard Stallman
2021-10-12  5:29                           ` Ag Ibragimov
2021-10-12  5:48                             ` Po Lu
2021-10-12 17:14                               ` Ag Ibragimov
2021-10-12 17:46                                 ` Stefan Kangas
2021-10-12 20:53                                   ` dick
2021-10-13  2:29                                     ` Eli Zaretskii
2021-10-13 11:56                                       ` dick
2021-10-13 13:19                                         ` Eli Zaretskii
2021-10-13  4:47                                   ` Ag Ibragimov
2021-10-13  0:02                                 ` Po Lu
2021-10-27 14:36                                 ` Richard Stallman
2021-10-27 18:04                                   ` dick
2021-10-27 18:27                                     ` tomas
2021-10-27 18:33                                     ` Eli Zaretskii
2021-10-27 18:55                                     ` Karl Fogel
2021-10-27 19:15                                       ` dick
2021-10-12  7:14                             ` tomas
2021-10-12  8:04                               ` Ag Ibragimov
2021-10-12 22:43                             ` Richard Stallman
2021-10-13  3:42                               ` Ag Ibragimov
2021-10-13  5:20                                 ` Po Lu
2021-10-13 12:39                                   ` Eli Zaretskii
2021-10-13 12:49                                     ` Po Lu
2021-10-13 13:25                                       ` Eli Zaretskii
2021-10-13 13:37                                         ` Po Lu
2021-10-13 13:53                                           ` Eli Zaretskii
2021-10-13 23:42                                             ` Po Lu
2021-10-13 13:38                                         ` Philip Kaludercic
2021-10-14 22:22                                         ` Richard Stallman
2021-10-14 22:26                                     ` Richard Stallman
2021-10-15  6:35                                       ` Eli Zaretskii
2021-10-15  9:54                                         ` Tim Cross
2021-10-12 22:43                             ` Richard Stallman
2021-10-13  5:36                               ` Ag Ibragimov
2021-10-13 22:40                                 ` Richard Stallman
2021-10-10 23:45                       ` Dmitry Gutov
2021-10-11  7:34                       ` Po Lu
2021-10-11  9:10                         ` Alexandre Garreau
2021-10-11 10:46                           ` Po Lu
2021-10-11 10:48                             ` Alexandre Garreau
2021-10-11 21:16                             ` Richard Stallman
2021-10-12  7:17                               ` tomas
2021-10-14 12:48                               ` Alexandre Garreau
2021-10-15 22:47                                 ` Richard Stallman
2021-10-11 21:10                       ` Richard Stallman
2021-10-22 16:23                       ` Mathias Dahl
2021-10-22 16:40                         ` Dmitry Gutov
2021-10-22 16:45                           ` Alexandre Garreau
2021-10-22 19:59                             ` Tim Cross
2021-10-22 22:27                               ` Dmitry Gutov
2021-10-22 22:48                                 ` Tim Cross
2021-10-22 23:11                                   ` Dmitry Gutov
2021-10-23 23:27                                 ` Richard Stallman
2021-10-25  7:47                               ` Alexandre Garreau
2021-10-23  2:00                             ` Po Lu
2021-10-25  2:17                             ` Richard Stallman
2021-10-25  7:00                               ` Alexandre Garreau
2021-10-22 16:55                           ` Mathias Dahl
2021-10-22 20:55                             ` Dmitry Gutov
2021-10-25  2:17                             ` Richard Stallman
2021-10-25  7:22                               ` Alexandre Garreau
2021-10-25  7:45                                 ` Theodor Thornhill
2021-10-25  7:51                                   ` Alexandre Garreau
2021-10-25  8:23                                     ` Theodor Thornhill
2021-10-30  6:51                                 ` Richard Stallman
2021-11-01 11:48                                   ` Alexandre Garreau
2021-11-01 17:47                                     ` Tim Cross
2021-11-03  3:18                                     ` Richard Stallman
2021-11-03 20:06                                       ` Jostein Kjønigsen
2021-11-05  3:53                                         ` Richard Stallman
2021-11-05  5:55                                           ` Daniel Brooks
2021-11-05  6:25                                             ` Jostein Kjønigsen
2021-11-05  9:56                                       ` Alexandre Garreau
2021-10-25  5:46               ` Jostein Kjønigsen
2021-10-06 20:57             ` Richard Stallman
2021-10-06 21:35               ` Philip Kaludercic
2021-10-05 10:15         ` Joost Kremers
2021-10-06 20:57           ` Richard Stallman
2021-10-12  2:52             ` Ag Ibragimov
2021-10-12  3:37               ` dick
2021-10-12  3:43               ` Stefan Kangas
2021-10-12 22:41                 ` Richard Stallman
2021-10-12  4:08               ` Stefan Monnier
2021-10-12  5:55               ` Po Lu
2021-10-12  7:22                 ` Ag Ibragimov
2021-10-12 10:21                   ` Philip Kaludercic
2021-10-12 12:14                     ` tomas
2021-10-12 12:51                       ` Philip Kaludercic
2021-10-12 13:08                         ` tomas
2021-10-12 12:22                   ` Stefan Monnier
2021-10-12 22:41                 ` Richard Stallman
2021-10-13  0:00                   ` Po Lu
2021-10-13  0:22                     ` Dmitry Gutov
2021-10-13  0:31                   ` Tim Cross
2021-10-13 17:15                     ` Joost Kremers
2021-10-13 17:34                       ` Dmitry Gutov
2021-10-13 20:00                         ` Tim Cross
2021-10-13 21:47                           ` Stefan Monnier
2021-10-13 23:14                           ` Dmitry Gutov
2021-10-14  6:39                           ` Eli Zaretskii
2021-10-14  6:58                             ` Po Lu
2021-10-14  6:52                           ` Po Lu
2021-10-14 11:08                             ` dick
2021-10-14 13:34                           ` Augusto Stoffel
2021-10-14  8:20                         ` João Távora
2021-10-15 22:51                           ` Richard Stallman
2021-10-16 19:02                             ` João Távora
2021-10-17 23:49                               ` Richard Stallman
2021-10-17 23:58                                 ` Dmitry Gutov
2021-10-20 22:33                                   ` Richard Stallman
2021-10-18  0:32                                 ` Tim Cross
2021-10-18  1:18                                   ` Stefan Monnier
2021-10-18  2:23                                 ` Eli Zaretskii
2021-10-18 12:43                                   ` Stefan Monnier
2021-10-18 13:13                                     ` Eli Zaretskii
2021-10-14  7:01                       ` Po Lu
2021-10-14  8:43                         ` [OT] Elisp as a general purpose programming language (was: Elisp LSP Server) Joost Kremers
2021-10-14 10:37                           ` Jean-Christophe Helary
2021-10-14  7:03                     ` Elisp LSP Server Po Lu

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=07cf50ddddb5a9556aa94201a7ac88c9@webmail.orcon.net.nz \
    --to=psainty@orcon.net.nz \
    --cc=emacs-devel@gnu.org \
    --cc=joaotavora@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).