5 ms·
I'm the OP, and I'm not really sure what the source of let-down is here. Nu has closures, anonymous functions, supports currying etc. It uses the Cocoa classes
by jashmenn 16y ago
I'm the OP, and I'm not really sure what the source of let-down is here.
Nu has closures, anonymous functions, supports currying etc. It uses the Cocoa classes and they claim it can even be compiled onto the iPhone.
So while the examples in git may be "imperative" I would guess its only because they are trying to show how to be interoperable with Cocoa objects which, not being functional, causes imperative constructs to creep back into your code. The same thing happens when you try to use existing Java objects in Clojure. This seems to be a limitation only of the examples and not of the language itself.
- itistoday 16y agoLisp for Cocoa would have been a better title. Clojure is quite a different Lisp, and to say that this is "Clojure for Cocoa" implies it has something in common with Clojure other than also being a member of the Lisp family, which it really doesn't. Clojure is very functional, Nu is not. Clojure's language is designed to make it safe and simple to write multithreaded code. Nu is just an imperative Lisp with smalltalk syntax so that it can interface with Cocoa/Objective-C. Clojure takes a departure from all Lisps by treating lists as just any other datastructre, and therefore has literal syntax for arrays, hashtables, and sets, Nu has no such thing. Clojure places a huge emphasis on "data abstractions" like Seqs and builds its core functions around that. Clojure is compiled, Nu is interpreted, etc... Don't get me wrong, I think Nu is really cool, but I can't think of a single thing that Nu shares with Clojure that is exclusive to Clojure and not Lisp.