News for hackers. Stuff that matters.
Re:A week with Hy by dTal on Friday August 09, 2019 @06:55AM (#20653105)
That's sort of the point. It's "just Python". It's s-expression syntax for Python.

Why would one want such a thing? Well, s-expressions confer many advantages (and of course, some disadvantages - it's good to have a choice!)

- It makes it easy to write code that writes code, which is useful because it affords "compile-time" abstractions with no runtime performance penalty (in lisp terms, "macros").

- If you're comfortable with a structure editor, it enormously lowers the friction involved in refactoring.

- It allows everything to be an expression:

  json.loads(with f as open("file.json"): f.read()) #doesn't work
  (json.loads (with [f (open "file.json")] (f.read))) ;works
- It effectively removes all restrictions based around things fitting on a single line - lambdas are the canonical example.

There are no comments on this comment yet.