Hi,
last week I got nerd-sniped when I saw an alternative to the 'parens-heavy' syntax of newlisp, wisp: https://www.draketo.de/software/wisp (https://www.draketo.de/software/wisp).
I've seen more alternative lisp syntaxes over the years (f.i. rhombus, shrubbery in Racket) but this is the first time that I can see this a viable alternative so I made a small newlisp module (indent.lsp) which you can download from https://github.com/luxint/wisp-newlisp (https://github.com/luxint/wisp-newlisp).
As an example this is wisp syntax:
define : factorial n
if : zero? n
. 1
* n : factorial : - n 1
which gets then transpiled into:
(define (factorial n )
(if (zero? n)
1
(* n (factorial (- n 1)))))
Have fun and let me know if you like it!
Interesting, but I'm fond of parentheses. :)
Yeah same here, parenthesis make everything easy to understand for me, I honestly don't get why anyone hates them.
Yes I like parentheses too 8) . I remember Interlisp having square brackets as "meta parentheses" so as to avoid strings of stopping parentheses; the two forms interoperated so that ']' closed all '(' to match prior balancing '[', and likewise ')' closed all '[' to match prior balancing '('.
One could then write for example the following
(define (factorial n)
[if (zero? n)
1
(* n (factorial (- n 1 ] )
Perhaps it's clearer? But the reader has to know the syntax in any case.