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: Thu, 30 Sep 2021 15:57:49 +0100

On Thu, Sep 30, 2021 at 3:27 PM Tomas Hlavaty <tom@logand.com> wrote:

> That does not work.  Common Lisp reader is programable.  If you do not
> compile and load everything needed sucessfully, the reader will fail for
> anything non-trivial.

Those non-trivial things are quite rare, and good reader etiquette makes the
code that is CL:READ with a non-full reader at least make a good deal of
sense.  Unless you're programming basic stuff like `(` and stuff, in which
case you've already lost.

But you're right, almost. The standard reader needs to know packages just to
be able to intern the symbols it reads.  UNLESS you use a non-interning reader
;-) Which is precisely what you should use for a lisp-specific grep-like.

And anyhoo, the point is moot for Elisp.  The reader is not programmable (yet!)
and shorthand definitions are file-local.  So building that grep-like is not
impeded by that question at all.

> > You're supposed to have it loaded in your image while you develop it.
>
> You can restrict yourself like that but why do you think that it is a
> reasonable restriction for everybody?

I don't know if it's a restriction.  It's what I and many consider the most
useful way to work with Lisp.  To have symbolic information at our
fingertips.  You like to have line-based literal-text information, sure go
ahead!  But you'll be missing a lot of free structure.
It's free symbolic real-estate!

> > It's not like C where you do something and have to recompile the whole
> > thing.
>
> It really depends on what you change.  Sometimes it is necessary to
> recompile the whole thing even in Common Lisp.

We're talkinga bout iterative development, which is where development
tools of the sort of grep come about.  I'm not stating that in CL I don't
recompile whole stuff from scratch Oh boy, I _wish_ I could state that.
Last CL job I worked it took at least 20 minutes.  So I and everyone else
developed a bit incrementally, then compiled the whole thing to test.

> > And grep fails very horribly in Common Lisp as you well know, if
> > you include the package qualifier.
> That's why good programmers make effort to choose good names independent
> of language.

So when you program CL you repeat the package qualifier in the symbol name?
I've seen that, yuck. And you never use `:USE` (not even` :USE :CL`) and you
always refer to the same symbol by the very same name every time? And
all your colleagues and the code you use in Common Lisp does that?

> Lots of Common Lisp code is awful because people play clever tricks with
> names and packages, symbol import, export, shadowing.

"With great power comes great responsibility", some beardy sysadmin
probably wrote.

João



reply via email to

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