Make python a lisp - indentation is just the number of brackets.
Hy - http://hylang.org
Make python a lisp - indentation is just the number of brackets.
Hy - http://hylang.org
(if x
(if y
(if z
foo)))
versus if (x) {
if (y) {
if (z) {
foo;
}
}
}Try it like this:
if (x)
{ if (y)
{ if (z)
{ foo; } } }
The rules are a little different. We have two-space indentation, like what is favored in Lisp, but there is a space after the opening brace. For symmetry, we put spaces between the closing ones. It works best if we don't "cuddle" the opening brace but put it on a new line.There is a rhyme and reason to it, and consistency.
I've written some C programs that way, though not recently and can't point to any online examples.
However, I also wrote, and maintain, the Yacc grammar file in TXR Lisp in this style (just the actions in the grammar portion). For whatever reason, it works well in grammar files.
{} are braces
This is English English
Swahili looks unfamiliar to me. Because I didn't grow up in southern Africa. Don't conflate subjective familiarity with objective simplicity - any "unfamiliar" concept only reflects on you, not your subject.
I was pointing out that there is yet another alternative.
I prefer lisp syntax over indentation aware (e.g. python) over block syntax and at the bottom ones that force semi colons on you (the end of line is sufficient) - so the OP syntax for me is a massive downgrade of the language.
Somewhere in that list I would add APL near the top but can't quite categorise it.