Angelo Chen wrote:
 Nice post, I was just wondering what's the benefit of using Scala or
 Groovy in a T5 app,

The main benefit : using a language that help you, not that don't stop putting strange restriction between your thougth and there expression.

 T5 app seems very short in code, typing a little extra does not mean
 too much to the developers,

Well, if some boilerplate can be remove, it's always better. But you are true, for classes that pair with template, the benefits are really small : Tapestry is doing an amazing work at reducing the amount of code written, and I expect (and seeà little benefits for now in that place.

But it's always simpler to have some kind of homogeneity on the languages you use across your application, and Scala is really shorter and more expressive than Java for deeper layers.

 the only benefit i can see from using Groovy(not so sure about Scala)
 is we can use closure in the code, anything else? also Clojure seems
 a interesting language too, possible to use with T5?

For the comparison between the three language, I would say that Groovy, Scala and Clojure are three *really* different languages. They share the same virtual machine, but it's almost the only things they share. Clojure and Groovy are dynamically typed, Scala is statically. Clojure has meta-programming, Groovy and Scala not really. Scala and Groovy are young languages (5 years), Clojure is in the same time the youngest, and the oldest - List has 40 years. Groovy is an OO language with some limited functional traits, Clojure is functional and not at all OO, and one of Scala goal is to mixed the two aspects. Groovy is born from two young passionated developers, Scala is an academic research work by one of the parent of javac and Java generics, Clojure is the work of a lone, experienced developer... And so on, and so on.

More related to your question: I believe that Howard is currently trying some experiment with Clojure, I would not be surprise if he tries it will T5 ;) The best place for learn about that for now is Howard's blog : http://tapestryjava.blogspot.com/search/label/clojure

And for the benefits... well, don't be fooled by the blub paradox[1]. You really have a lot to gain in using better language. Scala encourages immutable datas, has higher-order functions, closures and currying, pattern matching on classes, traits and mixin composition, is statically typed (not the joke Java is, and with (ok, limited) type inference), a good actor library for concurrency, and much more. So... perhaps the best is to learn new languages (not especially Scala, even if it's one of the simplest language to discover functional paradigm from a Java background). Look to Haskell, Python, Coq, Erlang, OCaml, Clojure... Try to learn the best practices with them, and after, ask yourself if really it didn't worth the try.


[1] it's a little story build up by Paul Graham to explain why expert developer in one language may have some difficulties to see the limits of their preferred tool. The story is here: http://www.paulgraham.com/avg.html


--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
-----------
http://fanf42.blogspot.com
InterLDAP - http://interldap.org
FederID - http://www.federid.org/
Open Source identities management and federation


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to