[plt-scheme] Fun with paren-shape

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Tue Jun 5 10:58:35 EDT 2007

Robby Findler skrev:
> Did you consider using utf-8? You can write something like this:
> [ n ∈ nat : (< n 10) ]

Embarrasing question: How do I enter ∈ on Windows?

> where "nat" and maybe a few other things are builtins or from some
> extensible generator set. Indeed, you could probably use the usual
> natural number sign.

We'll end up with Eli's list-of in Swindle :-)

> Also, I think you should use {} instead of []. Not only is it more
> traditional, but {} is rarely used (at least in my code :).

It is just a hack, so it isn't thought through. I only use [] for 
bindings and pattern-template pairings. But even if [] is used
for application, it shouldn't be problem (confusing perhaps),
because the triggers .. or : must be present, otherwise the
brackets are expanded to normal application.

> BTW, this seems much more robust than the vector notation (which,
> iiuc, won't work at the top-level, or in the test of an if, etc)

The vector works only inside an application, so you are absolute

Jens Axel Søgaard

Posted on the users mailing list.