@SpindleyQ @mcc I've been annoyed by the lack of keywords in Lisp conditionals for.. (https://github.com/akkartik/wart/commit/c2e6d0c6d3) almost 14 years. Indentation should either mean "code that also runs" or "code that sometimes runs". When it can be either in a single stanza the result is shit.
Kartik Agaram
Posts
-
So for a long time I found LISP elegant but I found the syntax infuriating. -
So for a long time I found LISP elegant but I found the syntax infuriating.@mcc I basically got rid of cond because the `((` pattern seemed to require new delimiters. So instead `if` is multi branch as you can see in fizzbuzz.
My approach was to keep it memorable by minimizing delimiters. There are only parens, just like in regular Lisp. You can just avoid inserting parens sometimes, that's it. (And then infix arithmetic and $ for implicit gensyms 😄 I should create a version with just the paren insertion rules.)
I used the same approach as you for single word lines. No parens around them, but no error either.
-
So for a long time I found LISP elegant but I found the syntax infuriating.@mcc cond is a particularly challenging form I never managed to come up with a clean formatting for.
(You can see examples including fizzbuzz of my whitespace sensitive Lisp at https://rosettacode.org/wiki/Category:Wart)
-
So for a long time I found LISP elegant but I found the syntax infuriating.@mcc Oh, no if/while wrap in lambda not just parens.
-
So for a long time I found LISP elegant but I found the syntax infuriating.@mcc It looks like everything between print and sp gets wrapped in one set of parens? How does the reader decide when to insert the ')'?
Does a single word on a line get wrapped?
Looks like you wrap your if/while bodies in an extra set of parens than conventional Lisp, is that right?