This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Reader option to permit brackets as parentheses


Chris Bitmead <cbitmead@ozemail.com.au> writes:

> Greg Badros wrote:
> > 
> > AFAICT, guile only accepts () as parentheses;  I find it far more
> > readable to be able to mix square brackets [] and round parentheses ()
> > in my expressions.  Any thoughts about adding a reader option to permit
> > this?
> 
> Uggh. Why don't you write your own repl. Sounds like a 10 minute
> exercise. Then you'll be able to write non-portable code for all you're
> worth.

You're looking at it in the wrong way-- other implementations permit
square brackets, so allowing Guile to read that code natively increases
the portability of the code.  Besides, several implementations let you
use [], and as you pointed out, it's easy enough to add to any other
system that doesn't support [], why not make it easy for Guile
programmers to write more readable code?

My original preference was trying to make a2ps's scheme mode use square
brackets occassionally, or use color to help match pairs of delimiters
in its printed output.  I'm convinced that the static readability of
Scheme code is a major hindrance to its widespread acceptance.  I've not 
had time to decipher the a2ps style sheet language, but it might be
easier to just write a tool to replace some () with [] in guile, and use 
that as a preprocessor before a2ps prints the resulting code.

Greg

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]