Hello Frank, On 11/10/2012 4:05 PM, Frank Shearar wrote:
On 10 November 2012 21:42, Jimmie Houchin <jlhouchin@gmail.com> wrote:
On 11/10/2012 11:03 AM, Igor Stasenko wrote:
It is too much imo.. Clojure->java -> c++
i would just write C++ code The API is either Java or C++ or .NET. I agree that no sane person would go Clojure->Java->C++ :) Why? It's all just bytecodes on a JVM. And Clojure is a _much_ nicer language than Java.
What I was referencing is that no one would want to use Clojure to interface with Java in order to access code in a C++ DLL. I agree that Clojure is nicer than Java.
Clojure would provide the option of interfacing natively the Java API, without having to write Java. But then I am left developing in Clojure, unless I decide to serve to Pharo via http/websockets. But you'd still need to write something here, to expose the API via HTTP, so you can't escape the net completely. Yes, I understand. Not trying to avoid the net. What I was stating is that I would either write my entire application in Clojure, or I would write the part which accesses FXCM's API and serve it to Pharo via http/websockets. Currently I have a Python/COM setup which serves my Pharo app via http. As I do not currently know Java or Clojure or C++, it currently seemed like learning Clojure as the optimal path of least resistance.
That is with a belief that I could learn Clojure better, easier, faster than C++, or at least a sufficient subset of C++ to work with NB. I think going the Clojure route makes more sense, but I am strongly biased towards functional programming languages. It is a simpler language to learn than Java, yet one that provides much richer libraries. You won't, for instance, have to write a for loop to iterate over a collection. Just read "reduce" and think "inject: into:" and you're halfway there.
frank I like Clojure, but I really, really like Smalltalk/Pharo. I also have significant time and code in Pharo which would have be rewritten in Clojure should I choose a Clojure route. So currently I really favor solutions which keep me in Pharo. I do like Clojure as the best non-Pharo solution.
Jimmie