Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> why should the function '>' get a different notation?

I think that the concept of standards is worthy of consideration. While '>' is an operator in scala and other languages, it's also an operator in basic mathematics. And in basic math, we're taught "if x is greater than zero" using the notation of "if x > 0" (parentheses notwithstanding.)

It's only consistent in terms of how clojure presents it, but it's inconsistent with treatment elsewhere. Consistency does go to simplicity, but if it takes some "getting used to", it can't be all that simple.



I think consistency with math doesn't make "if x > 0" simpler than "> x 0". Makes it easier, as it's already ingrained in the memory, yes.

For example, how would you express the "between?" in infix notation? In Clojure we can use the same function - "(> 1 x 0)".

I do agree that Clojure way takes some getting used to.


Yes, agreed. Although, what's the point of simplicity if things aren't any easier?


They actually are easier once you learn the (simple) novelties. Simplicity makes the learning process shorter.


>It's only consistent in terms of how clojure presents it, but it's inconsistent with treatment elsewhere.

Well, engineers using scientific calculators handled polish notation (and reverse polish notation, like 3 4 + for 3 + 4) just fine for half a century or so...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: