The problem with this question is that Functional Programming means many
different things to different people.

If we define FP negatively (i.e. the language does not allow anything
other than pure functions), then neither Scala or Clojure are FP. I
would side here with Doug Hoyte's Let over Lambda

(http://letoverlambda.com/index.cl/guest/chap5.html#sec_1)

which says "As we've seen, macros can invisibly change the meaning of
certain forms from being function calls into arbitrary lisp expressions,
a technique which is capable of violating referential transparency in
many ways that simply aren't possible in other languages." He's talking
about Common Lisp, but Clojure is a lisp and it's true there also.

If we define it to mean, allows many of techiques that come out of FP, I
would say that both do. (Scala recommeds vals not vars, but then so does
Clojure in that it only allows vals, which is calls vars or locals).

Finally, most functional programming research these days is done in
strongly typed systems, and obviously, here, Scala wins hands-down.

My conclusion: if you want to learn functional programming, I'd probably
just use Haskell. If you want to learn FP and do something with it, I'd
pick Scala or Clojure and make the choice on the basis of what it is you
want to do. I picked Clojure because I need strong JVM integration,
and syntactic plasticity. And, of course, the main reason is that I
already knew other lisps, so it was easier.

Phil


John Kida <jdk...@gmail.com> writes:
> I jumped on the FP bandwagon over a year ago and have been using Scala both 
> at work and for personal interest. Recently however I decided to take a 
> closer look at Clojure and see if it is something i actually like. I have 
> to admit at first the syntax form was awkward, but im starting to really 
> see the simplicity behind it.
>
> I have heard many people claim that Clojure sets you up and supports you 
> for FP more so then Scala does. However they never provide any examples of 
> something Clojure does that is more supporting of FP then the way idiomatic 
> Scala does it.
>
> Here are some things that I have heard people say when comparing Clojure vs 
> Scala in reference to FP
> Clojure has immutable persistance data structures..... but so does Scala
> Scala also tries to get you to use its immutable collections, like Vectors, 
> and are also persistent data structures. However they are not as uniform as 
> Clojures Seq i agree with that.
>
> Also Scala recommends using vals and not vars, which gives you immutable 
> references points
>
> I am certainly learning towards dropping Scala for a bit and giving Clojure 
> a real shot. The reason i even picked up Scala was because i wanted to 
> learn more about FP, and if there is a better tool for both doing and 
> learning FP then i want it.
>
> So tell me, if you have used both Scala and Clojure, do you have some real 
> examples of some things where Clojure really does support you better when 
> doing FP, where Scala really leads you no way, or worse the imperative way?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to