Hacker News new | ask | show | jobs
by DNied 1947 days ago
Very interesting! Maybe preprocessors really are the way to go for PHP, even if it were just for ironing out its inconsistencies (not to mention implementing a whole new language on top of it, as in this case).

But why those square brackets for argument lists? That seems unnecessary.

2 comments

It's a Clojure-ism. The arguments are passed as a vector.

https://clojure.org/guides/learn/functions

I'm no lisper but I think arguments are always defined in an array?
Clearly not a lisper :D But no worries.

No, it's not a array, it's a vector.

And no it's not always defined as a vector, it's a particular trait of Clojure. In Common Lisp you'd use a list "(my arguments)" instead, for example.

Always happy to learn, thank you! Clojure is my only real venture in to lisp land (I know some don't consider Clojure lispy enough to be a real lisp)