4 Replies - 4932 Views - Last Post: 12 July 2012 - 03:00 AM

#1 JacoboPolavieja  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 11-July 12

F# & Clojure, have to chose one

Posted 11 July 2012 - 03:19 AM

Hi all,

I have some experience with F# and have almost finished reading "The Joy of Clojure" which as provided me (I hope) enough preliminary insight on Clojure.
All of the worries below probably don't apply for the next 10 years period, but longer-term.
I am going to need a functional language to develop some projects in the coming years and, unfortunately, being a lone programmer I can't afford to invest my time in both. I really need to stick with one.


A) VM: Running on the JVM I think is more probable to have long term support with it being open source and having lots of third parties invested in it (the JVM, not Clojure itself I mean). Running on .Net it is all up to what MS might decide to do. It's true we have Mono as an open source option, and that leaves the open source future of F# tied to that of Mono's which, as much as I love the people behind it, doesn't have the amount of support and investment in it the JVM has.

B) Community: this is just a feel... but for me it seems that Clojure is having a more active community developing all sorts of interesting libraries and extensions to the language. This might just be a consecuence of people leaning towards Clojure due to reasons exposed in point A (or it may not).

C) Language: And here it is what's driving me nuts. Both are great languages (really), but it all boils down to personal preference. I do feel F# syntax much more appealing. I also do prefer its defaults of "strict by default, lazy when you need it", "static typing with support for interaction with dynamic when needed", "pure by default, mutating when needed", etc... I mean, if it wasn't for the worries of points A and B I would choose F# without a doubt.
I think it also fits better with my main field of action which would be financials and trading.

I've thought about all of this lots of times and would appreciate any opinions/experiences/insights you can provide, as maybe there are some other important things I may not be considering. But, in short... should I prioritize the language or the rest around it?

Thanks a lot. Cheers!

Is This A Good Question/Topic? 0
  • +

Replies To: F# & Clojure, have to chose one

#2 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 877
  • View blog
  • Posts: 3,122
  • Joined: 12-May 09

Re: F# & Clojure, have to chose one

Posted 11 July 2012 - 07:12 AM

For point A, I try to avoid single-platform languages because I want my skills to be as portable as possible. I think Clojure easily wins in that category. I try not to use much Microsoft stuff (not that it's bad by any stretch) because I don't want to be limited by OS. I do feel, however, that you can trust that Microsoft won't totally botch the platform - .NET is good, so if you don't mind running in Windows, you could be doing worse things.

For point B, there's definitely an active F# community, but I think Clojure gets more press as it is considered sort of a "cool" thing these days. I have absolutely no idea which established community is actually larger, but it's easier to see and hear about Clojure.

For point C, OCAML is also used in the financial sector. If you like the feel of F# a lot more than Clojure, go for it. I'm the sort of person who has a hard time enjoying a language if they syntax doesn't flow for me - that's why I prefer Ruby over Python even though both are great languages, and it's one of the many reasons I try to avoid C++.
Was This Post Helpful? 0
  • +
  • -

#3 JacoboPolavieja  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 11-July 12

Re: F# & Clojure, have to chose one

Posted 11 July 2012 - 08:16 AM

View Postxclite, on 11 July 2012 - 07:12 AM, said:

For point A, I try to avoid single-platform languages because I want my skills to be as portable as possible. I think Clojure easily wins in that category. I try not to use much Microsoft stuff (not that it's bad by any stretch) because I don't want to be limited by OS. I do feel, however, that you can trust that Microsoft won't totally botch the platform - .NET is good, so if you don't mind running in Windows, you could be doing worse things.

For point B, there's definitely an active F# community, but I think Clojure gets more press as it is considered sort of a "cool" thing these days. I have absolutely no idea which established community is actually larger, but it's easier to see and hear about Clojure.

For point C, OCAML is also used in the financial sector. If you like the feel of F# a lot more than Clojure, go for it. I'm the sort of person who has a hard time enjoying a language if they syntax doesn't flow for me - that's why I prefer Ruby over Python even though both are great languages, and it's one of the many reasons I try to avoid C++.
Hi and thanks for answering!

For the platform part we totally agree... As Clojure runs in both the JVM and the CLR it's a clear winner. It's doubtful that MS will botch .Net, but I want to have the possibility of using Linux or whatever. That is provided by Mono right know and it seems it will continue that way for some time, but it's not as sure as in Clojure's case.

As you say, Ocaml and now F# are used a lot in my fields of interests, although Clojure is starting to have some representation also. Maybe I'm worrying too much about the distant future instead of using the right tool for now.

Thanks a lot for sharing your opinions!
Was This Post Helpful? 0
  • +
  • -

#4 ishkabible  Icon User is offline

  • spelling expret
  • member icon





Reputation: 1618
  • View blog
  • Posts: 5,707
  • Joined: 03-August 09

Re: F# & Clojure, have to chose one

Posted 11 July 2012 - 04:05 PM

what about scala? it's a JVM language, it's functional, it's very fast, and statically typed. it has a *more* F# like syntax than Clojure syntax. I've been meaning to try it becuase it has a mixture of paradigms that sounds interesting and a new take on class composition using 'mixins'.
Was This Post Helpful? 0
  • +
  • -

#5 JacoboPolavieja  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 11-July 12

Re: F# & Clojure, have to chose one

Posted 12 July 2012 - 03:00 AM

View Postishkabible, on 11 July 2012 - 04:05 PM, said:

what about scala? it's a JVM language, it's functional, it's very fast, and statically typed. it has a *more* F# like syntax than Clojure syntax. I've been meaning to try it becuase it has a mixture of paradigms that sounds interesting and a new take on class composition using 'mixins'.

Hi!

After reviewing lots of functional languages I finally decided to go with Clojure or F# for several reasons. My PERSONAL view on Scala is that it's a mess... Both syntactically and feature wise. It lacks some functional constructs that are pretty common in other functional languages, it's type system though complete is VERY intrusive, and it feels like it's an OO language with wannabe aspirations of doing some functional work. The same but inverse could be said of F# or Clojure, which have support for OO though not widely used... but I'm prioritizing functional over OO by large. In fact, I think I'll only define objects in the case I really need some part of my code to interact with others using C# or Java (which I can't really think of any case now anyway :)).
So, in short, Scala doesn't appeals to me... although thank you for the suggestion.

I have to make a solid decission but I'm leaning towards F# right now... Maybe I'm overthinking the long-term thing when who knows how the world will be in 15 years, right?

Thanks a lot. Cheers!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1