unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Syntax for symbols is more permissive than R6RS
@ 2009-04-24  7:27 Mike Gran
  2009-04-24 15:27 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Gran @ 2009-04-24  7:27 UTC (permalink / raw)
  To: Guile Devel

Hi,

I was poking around the reader while working on the Unicode stuff, and I
found that there aren't checks for a lot of symbol names that R6RS
considers to be invalid.

The following line has 11 dodgy but not invalid variable names:

+  -  ...  00A  @  [  \  ]  {  |  } 

They can be strung together to make fun code like this:
(define - 1)
(define [ 2)
(define ] 3)
(+ 1 [ - 2 3 ])
==> 12

Which of these are useful extensions and which of these are bugs?

Thanks,

Mike Gran





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Syntax for symbols is more permissive than R6RS
  2009-04-24  7:27 Syntax for symbols is more permissive than R6RS Mike Gran
@ 2009-04-24 15:27 ` Ludovic Courtès
  2009-04-27 20:26   ` Neil Jerram
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2009-04-24 15:27 UTC (permalink / raw)
  To: guile-devel

Hi!

Mike Gran <spk121@yahoo.com> writes:

> I was poking around the reader while working on the Unicode stuff, and I
> found that there aren't checks for a lot of symbol names that R6RS
> considers to be invalid.

It's actually more permissive than R5RS as well.  For instance, `1+' and
`1-' are not valid R5RS identifiers IIRC.

I would be inclined to not change the reader's default behavior, i.e.,
to remain at least as permissive as in 1.8, so as to not cause
gratuitous incompatibility (we could even add unit tests to make sure we
don't remove them inadvertently.)

However, it may be a good idea to have a reader option asking for
strict(er) conformance.

Thanks,
Ludo'.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Syntax for symbols is more permissive than R6RS
  2009-04-24 15:27 ` Ludovic Courtès
@ 2009-04-27 20:26   ` Neil Jerram
  0 siblings, 0 replies; 3+ messages in thread
From: Neil Jerram @ 2009-04-27 20:26 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

ludo@gnu.org (Ludovic Courtès) writes:

> I would be inclined to not change the reader's default behavior, i.e.,
> to remain at least as permissive as in 1.8, so as to not cause
> gratuitous incompatibility (we could even add unit tests to make sure we
> don't remove them inadvertently.)
>
> However, it may be a good idea to have a reader option asking for
> strict(er) conformance.

I agree.  I'd prefer to leave the permissiveness intact until we have
a specific reason to change particular cases.

Regards,
        Neil




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-27 20:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-24  7:27 Syntax for symbols is more permissive than R6RS Mike Gran
2009-04-24 15:27 ` Ludovic Courtès
2009-04-27 20:26   ` Neil Jerram

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).