• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 79239
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 343
Mac OS X Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 :-)
reply
    Bookmark Topic Watch Topic
  • New Topic