From: storm@cua.dk (Kim F. Storm)
Cc: Kenichi Handa <handa@m17n.org>
Subject: Re: ?\_ patch
Date: 07 Feb 2003 16:51:01 +0100 [thread overview]
Message-ID: <5xadh8hyxm.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <20030207140204.GA6530@gnu.org>
Miles Bader <miles@gnu.org> writes:
> On Fri, Feb 07, 2003 at 03:52:02PM +0100, Kim F. Storm wrote:
> > > Because #\SPC is actually pretty self-explanatory whereas ?\s isn't.
> >
> > IMO, \s is just as self-explanatory as \t, \n, and \r.
>
> The latter are `self-explanatory' only because they're used in C, and so are
> very familar to programmers. \s is not.
The Lisp manual doesn't refer to C syntax to explain e.g. ?\t.
So to me, \s and \t are equally self-explanatory.
On the other hand, I don't find #\SPC self-explanatory (but ?\SPC is).
>
> > > I thought about that too, but I think #\SPC is better, because the `\'
> > > leaves a bit of whitespace between itself and the following character so
> > > the `SPC' stands out quite distinctly. `?' on the other isn't visually
> > > distinct, so #?SPC looks like a bit of a muddle.
> >
> > Then what about simply using ?SPC, ?TAB, etc.
>
> No, you're missing the point. My object to `?' is that the `?' is not
> visually distinct from the `S' -- they tend to `run into' each other.
> `\', on the other hand has a bunch of whitespace on the right side of it's
> glyph, and so is much more visually distinct from the following character.
Ok, I agree. However, I still think it is best to keep the ? as part
of the read syntax for a character, i.e. I prefer ?\SPC to #\SPC as
the ?\ prefix clearly identifies this as a character, e.g. I find the
use of ? in the following example more consistent than #:
(memq ch '(?\SPC ?\- ?\n ?\t))
(memq ch '(#\SPC ?\- ?\n ?\t))
I just grepped for "[?][\\][A-Z][^-]" in all of lisp/ and there isn't
a single occurrence. So the ?\XXX syntax should be safe.
> Morever, `#' is _good_ becaues it's the general lisp syntax for special
> syntax, so a lisp programmer will be much more likely to realize what's going
> on (if he's unfamiliar with this particular bit of syntax) if he sees #\SPC
> than if he sees ?SPC.
But `?' is _much better_ than `#' here, since _any_ lisp programmer
should know that this denotes a character, whereas `#' just denotes it
as "special" (but there's nothing special about a space character?).
I vote for ?\SPC over #\SPC.
But I still think adding ?\s is the best choice; it's simple, it
doesn't break anything, and it doesn't require us to introduce a
completely new character syntax.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2003-02-07 15:51 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-05 20:10 ?\_ patch Edward O'Connor
2003-02-05 23:31 ` Kenichi Handa
2003-02-06 0:44 ` Luc Teirlinck
2003-02-06 1:06 ` Luc Teirlinck
2003-02-06 1:20 ` Luc Teirlinck
2003-02-06 10:04 ` Kim F. Storm
2003-02-06 9:17 ` Miles Bader
2003-02-06 11:48 ` Kim F. Storm
2003-02-06 11:37 ` Juanma Barranquero
2003-02-06 17:33 ` Luc Teirlinck
2003-02-07 2:07 ` Miles Bader
2003-02-07 2:53 ` Luc Teirlinck
2003-02-07 8:34 ` Miles Bader
2003-02-07 8:56 ` Kenichi Handa
2003-02-07 14:17 ` Kim F. Storm
2003-02-07 13:28 ` Miles Bader
2003-02-07 14:52 ` Kim F. Storm
2003-02-07 14:02 ` Miles Bader
2003-02-07 14:30 ` Dmitry Paduchikh
2003-02-07 16:07 ` Kim F. Storm
2003-02-07 15:53 ` John Paul Wallington
2003-02-07 16:50 ` Kim F. Storm
2003-02-07 16:23 ` John Paul Wallington
2003-02-08 1:44 ` Miles Bader
2003-02-09 2:07 ` Kim F. Storm
2003-02-10 1:48 ` Miles Bader
2003-02-07 16:09 ` Dmitry Paduchikh
2003-02-07 15:51 ` Kim F. Storm [this message]
2003-02-07 15:13 ` Damien Elmes
2003-02-07 20:20 ` Luc Teirlinck
2003-02-09 12:39 ` Richard Stallman
2003-02-10 10:47 ` Andreas Schwab
2003-02-07 9:18 ` Richard Stallman
2003-02-07 10:42 ` Kim F. Storm
2003-02-07 11:05 ` Andreas Schwab
2003-02-10 10:35 ` Richard Stallman
2003-02-10 12:51 ` Kim F. Storm
2003-02-11 22:25 ` Richard Stallman
2003-02-12 13:00 ` Kim F. Storm
2003-02-13 10:08 ` Richard Stallman
2003-02-13 14:19 ` Kim F. Storm
2003-02-06 1:31 ` Kenichi Handa
2003-02-06 10:40 ` Andreas Schwab
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=5xadh8hyxm.fsf@kfs2.cua.dk \
--to=storm@cua.dk \
--cc=handa@m17n.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.