[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: defining new character names?
From: |
Lars J. Aas |
Subject: |
Re: defining new character names? |
Date: |
Wed, 21 Aug 2002 11:17:54 +0200 |
User-agent: |
Mutt/1.3.24i |
Matthias Koeppe <address@hidden> wrote:
: "Lars J. Aas" <address@hidden> writes:
:
: > The most "transparent" solution would be to allow
: >
: > (define #\paren-close #\051)
: >
: > [If the first token looks like a character constant, the second must
: > be one too?] Would that be possible to implement without any overhead
: > on the define implementation? Would it break something?
:
: It would break everything.
:
: DEFINE does not operate on "tokens". You seem to be missing that
: there are two phases when you feed forms into Guiles:
Sorry if I come across as a moron here ;) I know it would only work
if define was handled closely integrated with the reader, which I now
know it obviously is not.
: What I think _would_ be useful for Guile is a new DEFINE form that
: creates constant variables, like DEFINE-CONSTANT, so you could say
:
: (define-constant paren-close-char (integer->char 41)).
:
: This may serve useful for compiler optimizations, because the compiler
: (if any) could assume that the value of the variable never changes.
Yes, this would be nice - it could perhaps also help catch bugs by throwing
exceptions when constants are tried modified.
Anyways, what I feel would be nice is to have modify/extend-access to
the reader's table of #\... character keywords, so I wouldn't be limited
to the existing set defined in libguile/chars.c. Anyways, I'll have
to do without it for now obviously. I'll leave it up to you Guile
wizards to decide on whether this would be something worth adding to a
future version of Guile or not.
Lars J
- defining new character names?, Lars J. Aas, 2002/08/19
- Re: defining new character names?, Marius Vollmer, 2002/08/19
- Re: defining new character names?, Keith Wright, 2002/08/20
- Re: defining new character names?, Keith Wright, 2002/08/21
- Re: defining new character names?, Lars J. Aas, 2002/08/21
- Re: defining new character names?, rm, 2002/08/21
- Re: defining new character names?, Matthias Koeppe, 2002/08/21
- Re: defining new character names?,
Lars J. Aas <=
- Re: defining new character names?, rm, 2002/08/21
- Re: defining new character names?, Matthias Koeppe, 2002/08/27
Re: defining new character names?, Matthias Koeppe, 2002/08/20