emacs-devel
[Top][All Lists]
Advanced

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

Re: Proper namespaces in Elisp


From: João Távora
Subject: Re: Proper namespaces in Elisp
Date: Tue, 5 May 2020 15:03:06 +0100

On Tue, May 5, 2020 at 2:34 PM Andrea Corallo <address@hidden> wrote:

> I believe the program wants just to return the symbol 'aaa' and does not
> want to bother about other 1000 complications of the CL package system.

But that's not the program you wrote.  If you want to return
a symbol that is universally univocally  independent of
context, you use a keyword, not an internal symbol.  That
is substituting a " ' " for a " : ", a one-char change. That
different program does what you want (which I suppose
is not print the string "boom")

You're thinking about One Big Namespace. Fine. But that's
Elisp. And it has the problems this thread is proposing to
solve.  But you can go full Elisp in Common Lisp, just use
a single package always.

> I suggest to try to abstract one second from the implementation point of
> view.  This is a low level detail.

I agree, but it's you who said the reader-based approach
had implications.

> > Or did you mean you want an auto-exported,
> > self-evaluating,  quick-to-type, one-big-namespace
> > qualifier? The keyword package is there for that, as
> > you probably know, and that's what everybody uses.
> >   _When_  they want those semantics.  So, for me,
> > being able to determine the semantics of my program
> > (also called "programming") with little typing is a very
> > good thing, a very good "implication",  it's exactly the
> > power I crave.
>
> I've no doubt you can make it working with CL, guess what they have made
> full operating systems with it... and it worked.

Even if they didn't make OS's out of it.  The point is I don't need
those to refute your particular arguments.

> I'm just saying that if you look to it from another perspective is very
> complex and error prone system and this is an example.

It's not complex. It's a powerful system.  Don't use the parts you
don't understand yet, then.  Look, if we had them, people would
happily hack on the "Emacs" package all the time and noone
would notice it.  But people you want to use modern-string.el
could (use-package :modern-string) and find that s:thingamabob
does that sweet thing they like.

And when you wanted to write a library, you would learn it.
It's not hard, believe me.

> That said is just my opinion (arguably shared by a number of people) so
> please take it just for what it is.

Oh I take it, sure.  I just think your particular one, based on the
examples you gave me, it's based on very light (mis)usage of
the package system and misunderstanding of its features.

You _could_ have said you don't like the ocasional erroring
and nagging by the debugger about symbol conflicts, but
I would  have answered, hey conflicts exists like when some
other Andrea shows up and we have to disambiguate.
Or you could have said that it is strange to mistype "foo" in
the REPL and then find FOO has been interned. Or how
it's tricky to resist DOS attacks in because of malicious
interning through the reader (if you don't take precautions).
But now that I think of it, these problems happen in Elisp too.

João



reply via email to

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