On Jan 29, 2013 11:47 AM, "David A. Wheeler" <dwhee...@dwheeler.com> wrote:
>
> John Cowan:
> > My machinery for testing different Schemes isn't working right now, but
> > I would be astonished if any Lisp treated "." as an ordinary identifier,
> > ever. I have a vague memory that there are some Lisps in which things
> > like (. foo bar) are reader syntax for something or other, but I can't
> > pin it down.
>
> Guile does, if it can't be understood as setting the cdr. This:
> (list '.)
> Produces:
> (#{.}#)
>
> And yes, that's a period symbol.
> Guile info doc 5.5.7.6 (Extended Read Syntax for Symbols) says:
> "In addition to the standard read syntax defined above (which is taken
> from R5RS (*note Formal syntax: (r5rs)Formal syntax.)), Guile provides
> an extended symbol read syntax that allows the inclusion of unusual
> characters such as space characters, newlines and parentheses. If (for
> whatever reason) you need to write a symbol containing characters not
> mentioned above, you can do so as follows.
>
> * Begin the symbol with the characters `#{',
>
> * write the characters of the symbol..."
>
Yes, but various bugs(?) prevent the period symbol from being working as a
variable name (I'm on guile 1.8.8):
guile> .
ERROR: Unbound variable: #{.}#
ABORT: (unbound-variable)
guile> '.
#{.}#
guile> '#{.}#
#{.}#
guile> (equal? '. '#{.}#)
#t
guile> (define #{.}# 2)
Backtrace:
In standard input:
8: 0* (define . 2)
standard input:8:1: In procedure memoization in expression (define . 2):
standard input:8:1: In file "standard input", line 7: Bad expression
(define . 2).
ABORT: (syntax-error)
guile> (let ((#{.}# 3)) #{.}#)
ERROR: In procedure scm_read_expression:
ERROR: standard input:9:24: unexpected ")"
ABORT: (read-error)
guile> ((lambda (.) .)
ERROR: In procedure scm_read_expression:
ERROR: standard input:10:13: unexpected ")"
ABORT: (read-error)
guile> ERROR: Unbound variable: #{.}#
ABORT: (unbound-variable)
guile> ERROR: In procedure scm_read_expression:
ERROR: standard input:10:16: unexpected ")"
ABORT: (read-error)
guile> ((lambda (#{.}#) #{.}#) 4)
ERROR: In procedure scm_read_expression:
ERROR: standard input:11:17: unexpected ")"
ABORT: (read-error)
guile> ERROR: Unbound variable: #{.}#
ABORT: (unbound-variable)
guile> ERROR: In procedure scm_read_expression:
ERROR: standard input:11:24: unexpected ")"
ABORT: (read-error)
guile> 4
guile> ERROR: In procedure scm_read_expression:
ERROR: standard input:11:27: unexpected ")"
ABORT: (read-error)
guile>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Readable-discuss mailing list
Readable-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/readable-discuss