[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] readline egg v2.0 feedback
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] readline egg v2.0 feedback |
Date: |
Tue, 27 Jan 2015 09:36:55 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
signature.asc
Description: Digital signature