News for hackers. Stuff that matters.
Re:Reading Simple Haskell by cygned on Saturday December 09, 2017 @12:04PM (#15886687)

    x +- y = (x + x) - (y + y)
That's crazy.

I should learn Haskell (again).

Re:Reading Simple Haskell by Tehnix on Saturday December 09, 2017 @12:19PM (#15886776)
`+-` here is an entirely new operator though. The shuffling of arguments might look a bit weird though, it could also be written

    (+-) x y = (x + x) - (y + y)
Symbol operators are automatically infix though, and you can make them normal using (), same as backticks make normal functions infix, `a la 2 `plus` 3.
Re:Reading Simple Haskell by mlevental on Saturday December 09, 2017 @12:13PM (#15886747)
what exactly is crazy about this?
Re:Reading Simple Haskell by runeks on Saturday December 09, 2017 @01:25PM (#15887166)
The simplicity with which a new operator is defined.
Re:Reading Simple Haskell by akhilcacharya on Saturday December 09, 2017 @07:00PM (#15888898)
I think this is a downside. It just makes reading new code that uses esoteric symbols defined elsewhere.
Re:Reading Simple Haskell by gilmi on Sunday December 10, 2017 @03:15AM (#15890509)
This[0] operator glossary reviews the most used operators.

[0]: https://haskell-lang.org/tutorial/operators

Re:Reading Simple Haskell by cygned on Saturday December 09, 2017 @04:47PM (#15888358)
This. Incredible elegant. I always enjoy these types of things when programming Lisp.