4 ms·
Fast Clojure Vectors and Multidimensional Arrays
- henning 17y agoCouldn't you make a Clojure macro that would let you type arithmetic expressions in infix? Not having Fortress-type support for math in a language is bad enough, but having to type everything prefix is really a PITA when you're just trying to type in a standard formula from a book or a paper.
- anonjon 17y agoyou could, but then you would be needlessly breaking the regularity of the language. the whole point of lisp is to make stuff super ultra regular so that it is really really easy to manipulate unambiguously.
- wooby 17y agoSure. You can do it with a regular function, for an example see page 12 of the upcoming Joy of Clojure book: http://www.manning.com/fogus/Fogus_MEAP_Ch1.pdf http://www.manning.com/fogus/Fogus_MEAP_Ch1.pdf
- deleted 17y ago[deleted]
- deleted 17y ago[deleted]