|
|
|
|
|
by madhouse
4530 days ago
|
|
I hate significant whitespace, and the syntax of Python (not enough parens; allows crazy oneline hacks with comprehension, yet still forces indentation otherwise; blindly following pep8 often results in horrible mess of a code, etc). Hy gets rid of both the significant whitespace, and the syntax too. Yet, allows me to have bidirectional interop, so people using my modules are none the wiser, as long as I make a little effort to remain python compatible (macros used only internally, and not exposed in the API, and using valid python names for functions and other stuff). |
|
As for "getting rid of the syntax", I think that's a bit disingenuous. Much like Clojure, Hy cheats by collapsing nesting:
I mean, this isn't just getting rid of syntax. It's getting rid of structure. As a purist, my stance is that you either keep the structure (`{(1 2) (3 4)}` or you add syntax (`{1 2, 3 4}`, and unlike Clojure, make the comma significant). What you don't do is tuck syntactic information in the parity of the rank of an argument.