[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NOISE] Curly braces [was Re: Curl]




> Date: Thu, 29 Nov 2001 15:09:27 -0800 (PST)
> From: Morgan McGuire <morgan3d@yahoo.com>
> 
> --- Matthias Felleisen <matthias@ccs.neu.edu> wrote:
> > Well, as some of you may know, PLT Scheme started supporting braces a
> > couple of years back, so that you can write 
> > 
> >  {define {f x} {* pi x x}}
> 
> Seriously, having {} and [] as () synonyms is one of my favorite PLT
> features... it really improves the readability.
> 
> -m
> 

I agree that it's a nice feature.  However, I can't help but wonder if it's
wasting syntax that could be used for something more powerful.  I'm
thinking of something along the lines of read-macros to handle infix
expressions, or maybe the partial function syntax suggested by Paul Graham:

[ + _ 1 ] ;; => (lambda (x) (+ x 1))

Personally, I'd like to see a lisp that has some (optional) notion of an
end tag e.g.

(if (< a b)
	(display "less")
	(display "more")
@end-if)

where the @ signifies that the end-if tag has to match the if form.  This
would extend the notion of [] {} as used in PLT scheme.  OTOH the PLT
system works well with `let'.

Mike