unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Lynn Winebarger <owinebar@free-expression.org>
Subject: Re: defining new character names?
Date: Wed, 21 Aug 2002 13:27:23 -0500	[thread overview]
Message-ID: <0208211327230L.19624@locke.free-expression.org> (raw)
In-Reply-To: <200208211733.g7LHXpT00887@fcs9.free-comp-shop.com>

On Wednesday 21 August 2002 12:33, Keith Wright wrote:
> > From: Lynn Winebarger <owinebar@free-expression.org>
> > 
> > Given the raging debate on this, I'll point out that Chez
> > Scheme has a function char-name that does this job.
> 
> The debate is over a mechanism to define new character names
> (or possibly more general constants).  This appears to be
> a function (or macro?) that fetches an already defined
> character name.  I don't see the relevance.

      It serves multiple purposes.
      As for constants, there's no reason to believe we want
character names to be constant.  There's plenty of reason
to consider forms for setting constants, but this is not one of
them.  Consider

(char-name 'separator #\tab)
 ....
         (begin (display (format "~s~s~s" a #\separator b)) (newline))
 ....
(char-name 'separator #\space)

Sure it's ugly, but some people like that sort of thing.

> > (char-name 'sym) => #f
> > (char-name #\b) => #f
> 
> Why is that not (char-name #\b) => 'b ?
      Because b is the literal value of the character, not the
symbolic representation.  Of course, you could make it
so any non-numeric representation is considered symbolic,
that's just not how chez defines it.
       Then again, it might be that Dybvig didn't think
(char-name 'b #\a) would be a very useful thing to do,
so prohibited it.

> 
> > (char-name 'paren-close #\051) => unspecified
> 
> Now it's got two arguments instead of one.  WTF!?

     Perhaps you've heard of functions with a variable number
of arguments?

> > (char-name #\paren-close) => 'paren-close
> 
> Am I meant to guess that the preceding function
> (macro?) call with too many arguments was actually
> a definition?

      Yes, and it's a procedure.

> I understand it not at all.  Are you sure those
> examples are correct?
> 
     I just hope it's not a copyright violation, as it's almost
verbatim from the chez user's guide.

Lynn


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


  reply	other threads:[~2002-08-21 18:27 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-21 15:24 defining new character names? Lynn Winebarger
2002-08-21 17:33 ` Keith Wright
2002-08-21 18:27   ` Lynn Winebarger [this message]
2002-08-21 19:06     ` rm
2002-08-21 19:47       ` Lynn Winebarger
2002-08-21 23:04       ` Keith Wright
2002-08-21 23:07       ` Keith Wright
2002-08-21 19:40     ` Marius Vollmer
2002-08-22  4:12     ` Keith Wright
2002-08-22  5:16       ` Lynn Winebarger
2002-08-22  7:42         ` rm
2002-08-22  8:39           ` Lynn Winebarger
  -- strict thread matches above, loose matches on Subject: below --
2002-08-19 10:07 Lars J. Aas
2002-08-19 23:36 ` Marius Vollmer
2002-08-20  3:40   ` Keith Wright
2002-08-21  4:01     ` Keith Wright
2002-08-21  8:12     ` Lars J. Aas
2002-08-21  8:43       ` rm
2002-08-21  8:51       ` Matthias Koeppe
2002-08-21  9:17         ` Lars J. Aas
2002-08-21  9:54         ` rm
2002-08-27 15:09           ` Matthias Koeppe
2002-09-01 16:24   ` Rob Browning
2002-09-01 16:49     ` Marius Vollmer
2002-08-20  8:20 ` Matthias Koeppe
2002-08-20 10:18   ` rm
2002-08-21  9:20     ` Matthias Koeppe
2002-08-21 10:00       ` rm
2002-08-21 18:01       ` Marius Vollmer

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=0208211327230L.19624@locke.free-expression.org \
    --to=owinebar@free-expression.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).