chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] readline egg v2.0 feedback


From: Alexej Magura
Subject: Re: [Chicken-users] readline egg v2.0 feedback
Date: Tue, 27 Jan 2015 04:01:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

I don't think I'll use the toplevel-command stuff after all: I can't promise that the toplevel symbols readline exports won't get overwritten, and I'm not entirely sure readline has any business providing private toplevel symbols that are only applicable to it.  It might confuse less-experienced users*, for one, and for another there's the already mentioned possibility of symbol collision, unless somebody more knowledge on this subject can prove otherwise.

* In the sense that they may not realize that it's part of readline and so may expect it's behavior to remain consistent even when readline is not in use.

On 01/27/2015 01:36 AM, Peter Bex wrote:
On Tue, Jan 27, 2015 at 09:10:31AM +0100, Shawn Rutledge wrote:
On 26 January 2015 at 00:02, Matt Welland <address@hidden> wrote:
From http://wiki.call-cc.org/man/4/Using%20the%20interpreter the
,commands are called "toplevel commands" and you can define them with:
(toplevel-command SYMBOL PROC [HELPSTRING])
Where does this tradition come from?  Is it related somehow to the use of
the comma as unquote inside a quasiquote?
I suppose so: at the toplevel, you can enter any _expression_, so for
example just entering X will evaluate it.  For that reason you'll
need a special character to indicate that you're talking to the
interpreter itself instead of evaluating something at the toplevel.

You can't unquote anything outside a quasiquote _expression_, so it's
kind of natural to use that as a prefix: it's one of the few undefined
characters to use without adding additional restrictions to the lexical
syntax of symbols, for example.

It always seems unintuitive to
me to start anything with a comma.
I've gotten used to it already, but then I'd used vi for such a long time
that starting a command with a colon seems "intuitive" to me also :)

Cheers,
Peter


_______________________________________________
Chicken-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/chicken-users


reply via email to

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