I've been trying to wrap my head around the benefits of functional
> programming vs straight OOP.  my biggest problem is i have been doing
> nothing but OOP since i started 12 or so years ago and have never run
> into a situation i couldn't solve so i don't understand the reason to
> learn a new paradigm when the one i use every day works.  most of the
> time on the podcasts you guys automatically assume everyone knows the
> difference and i usually struggle to keep up.
>

This isn't quite right, asking to contrast FP and OOP is like asking to
contrast cars and automatic transmission.  Sure, there are a lot of cars on
the road with manual transmission, but the two concepts are far from being
mutually exclusive.

The true divide is declarative programming vs imperative programming, with
FP being a subset of the declarative paradigm (as is SQL).  It just so
happens that mainstream object-oriented programming languages *so far* have
all been imperative, leading you to treat the two ideas as one and the same.

Object-Orientation is just a structuring that can be applied to both
imperative and declarative styles.  Most current functional languages
support this, including Lisp (either clojure or CLOS), Erlang, ML, F# and
Scala.


i read the book that was recommended on one podcast for getting wet
> with functional programming, Javascript: The Good Parts by douglas
> Crockford and that was VERY good.  he was very clear in the way he
> spoke, not a lot of fluff, basically a book by a programmer for a
> programmer, not this usual amateur to professional crap most authors
> put out.  it really helped in getting javascript to make sense.  until
> that i never realized it was a functional language and i guess thats
> why i always struggled with it for the past 10 years.  but now it
> makes sense.
>
> but that doesn't help me in why should i switch from java to say
> scala.
>


I can't recommend enough the series "Scala for Java Refugees" series of
articles:
http://www.codecommit.com/blog/scala/roundup-scala-for-java-refugees


> i guess what i would like is a book where first the author assumes you
> know OOP and java, and builds the same application from beginning to
> end, it could be anything.  one in java, one in say scala and show
> point by point why functional is better/different in some cases when
> compared to OOP.
>


If you're after a book, then the "Bible" is "Programming in Scala (2nd
edition)"
http://www.artima.com/shop/programming_in_scala_2ed
Written by Martin Odersky (creator of both Scala and the current version of
javac), Lex Spoon, and Bill Venners (co-founder of escalate software, along
with our very own Dick Wall)


It's written very much with existing Java developers in line, and the 2nd
edition was released just a few days ago; covering the new features in Scala
2.8, including the massively refactored collections library.


does that book exist?  i get the feeling scala and some of these newer
> languages will start eating away java's market soon if not already so
> i want to understand, i just have the handicap of doing it only one
> way for 12 years to get away from and need some help
>
>
It's a brave step to take, and I think you'll be pleasantly impressed at how
helpful and supportive some of the online communities are for many of the
newer JVM languages.


-- 
Kevin Wright

gtalk / msn : [email protected]
<[email protected]>mail: [email protected]
pulse / skype: kev.lee.wright
twitter: @thecoda

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to