On Mon, Jul 22, 2019 at 10:46:26AM +0200, Dexter Lagan wrote:
>   I'm not going over why s-expressions are the way to go, mr. Rivest did it
> best in his 1997 MIT doc:
> 
> https://people.csail.mit.edu/rivest/Sexp.txt
> 
>   A parens-less Racket2 would become Crystal. And I don't think we need yet
> another functional parens-less language.

Keep S-expressions, but change their syntax.

Nesting parentheses are like recusion.
Create a notation for tail-nested parenthese, kind of like 
tail-recursion optimisation, turning that kind of nesting 
into something more like iteration.

It's tail-nesting that tends to move indentation far, far to the right 
and creates accumulations of hard-to-count close-parenthesis 
agglomerations.

My proposal is to pick a currently underused character (I picked '/' 30 
years ago but amost anything would do) and use it to replace the 
tail-nesting '(', and remove its corresponding ')'.

Suddenly visual parenthesis-matching becomes an order of magnitude 
easier, without losing any of the expressiveness and conceptual 
significance of S-expressions.

-- hendrik

> We already have Haskell (hard to
> read) and Crystal (weird half-commercial proposition that won't produce
> binaries without major hacks). I say we keep the parens but make them even
> less intrusive.

A notation for tail-nestig accomplishes non-intrusive parens all by 
itself.

> Newlisp may be an ugly hack, but its simplified forms and
> anaphoric vars are very nice to use. For example:
> 
> http://www.newlisp.org/downloads/newlisp_manual.html#if

With tail-nesting notation, there's no need for the iterated if.
And this if-iteration can be freely interspersed with let's.  Also a 
common occurrence.

Tail-nesting notation is completely orthogonal to the rest of the 
language.

-- hendrik

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20190722140957.wcz5oupiuavm4cmk%40topoi.pooq.com.

Reply via email to