This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any new control structures or new aspects covered in ' The Well Grounded Java Developer'?

 
charlsy chuks
Ranch Hand
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Martijn,

That was a quick answer to my question on J2ME . I read that switch statement can now take string cases. Are there any other any changes or new features for existing control structures as we know them in Java 6?
What are functional languages like? Could you throw more light on Clojure, Groovy and Scala. Thank you.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Functional languages work largely by returning values, and most functions are called in a sort of recursive mannr.
By new control structures, you might mean try‑with‑resources, or multiple catch types, or the <> in generics.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell's got it! Our Functional Programming Slideshare presentation might help give you some motivations/understanding for functional programming as a Java developer.
 
Palak Mathur
Ranch Hand
Posts: 322
IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martijn Verburg wrote:Campbell's got it! Our Functional Programming Slideshare presentation might help give you some motivations/understanding for functional programming as a Java developer.


I think I will add it to Clojure FAQ so that it is easier for new learners to Functional Programming to grab the essence.
 
charlsy chuks
Ranch Hand
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Thanks Guys for the answers guys but I really need to get to the root of this. Functional languages help us write more safer OO code but one of the main features is that code and data are one?
Hmmm that for me looks like potential trouble if you ask me.

Where do we draw the boundaries so we do not mistake? Maybe my questions arise from the fact that I have used non-functional imperative languages. However, I am not biased and I am willing to explore these
new range of functional languages especially Clojure which is also Dynamic.

 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Functional does not trump OO nor visa versa. There are just certain idioms where functional works out better, for example filter, map and reduce type operations that don't alter the original collection. You'll find common places in Java code such as Listeners, Handlers, Callables and Runnables as will as the traditional for loop with an if filter inside of it that are ripe for writing in a more functional manner.

NB: Arguably anonymous inner classes in Java are functional... it's just a clunky syntax :-)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic