all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrea Corallo <akrl@sdf.org>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: A prototype for a binding based approach to proper namespaces
Date: Sat, 09 May 2020 08:27:46 +0000	[thread overview]
Message-ID: <xjfzhaho6m5.fsf@sdf.org> (raw)
In-Reply-To: <m2mu6ho8w8.fsf@gmail.com> (Helmut Eller's message of "Sat, 09 May 2020 09:38:31 +0200")

Helmut Eller <eller.helmut@gmail.com> writes:

> On Fri, May 08 2020, Andrea Corallo wrote:
>
>> Hi all,
>>
>> given the ongoing discussion on namespaces I thought was interesting to
>> try out a prototype to reason on.
>>
>> I wrote a short page explaining what I did and how it is implemented:
>>
>> https://akrl.sdf.org/lexspaces/lexspaces.html
>>
>> It's a quick hack, certainly many pieces are missing, is potentially a
>> very bad idea, but I'd be interested in opinions.
>
> On the page you asked "I don't know if other similar implementations
> exists (I'd guess so) and I'd like or hear about those if someone are
> aware".  MIT Scheme (and hence the Edwin editor) has "environments"[1]
> which seem to similar to your lexicons.  But it's not well documented.
>
> I believe, like Stefan, that a big problem is the use of symbols as
> "designators" (to borrow Common Lisp terminology).  E.g. funcall works
> on functions but also on symbols.  The symbol designates a (global)
> function.  The same thing for faces: symbols are used to designate
> faces, which only exist in C code.  XEmacs has actual face objects, but
> almost everywhere where a face object is required a symbol can be used
> too.
>
> Maybe that problem could be (partially) solved by having an operator,
> like:
>
>      (resolve-designator NAME)
>
> that returns the full symbol for NAME based on the currend lexical
> environments.  This would be a pure compile-time operation, a bit like
> macroexpand.  E.g. instead of 

Yes it's an interesting problem.  Isn't sufficient to select the wanted
behavior to do as follow?

;; foo define in another Lexspace will use its definition of bar.
(foo #'bar)

;; This will use the definition in the current lexical enviroment instead.
(foo (symbol-function bar))

Thanks

  Andrea

-- 
akrl@sdf.org



  reply	other threads:[~2020-05-09  8:27 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 20:47 A prototype for a binding based approach to proper namespaces Andrea Corallo
2020-05-08 23:43 ` Daniel Colascione
2020-05-09  8:05   ` Andrea Corallo
2020-05-09 15:16     ` Daniel Colascione
2020-05-09 15:50       ` Andrea Corallo
2020-05-09 15:56         ` Daniel Colascione
2020-05-09 16:39           ` Andrea Corallo
2020-05-09 16:41             ` Daniel Colascione
2020-05-09 17:15               ` Andrea Corallo
2020-05-09 17:17                 ` Daniel Colascione
2020-05-09 23:14                   ` Andrea Corallo
2020-05-09 23:46                     ` João Távora
2020-05-09 23:29     ` Vladimir Sedach
2020-05-09 23:53       ` João Távora
2020-05-10  0:12         ` Daniel Colascione
2020-05-10  4:18         ` Vladimir Sedach
2020-05-10 15:24       ` Andrea Corallo
2020-05-10 17:46         ` Vladimir Sedach
2020-05-10 20:14           ` Andrea Corallo
2020-05-09  7:38 ` Helmut Eller
2020-05-09  8:27   ` Andrea Corallo [this message]
2020-05-09  8:50     ` Helmut Eller
2020-05-09 10:57       ` Andrea Corallo
2020-05-09 16:09   ` Dmitry Gutov
2020-05-09 18:08     ` Helmut Eller
2020-05-09 18:55       ` Dmitry Gutov
2020-05-09 22:52 ` Vladimir Sedach

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

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

  git send-email \
    --in-reply-to=xjfzhaho6m5.fsf@sdf.org \
    --to=akrl@sdf.org \
    --cc=eller.helmut@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.