Venkat has a very nice post on the importance of language idioms. He starts with a small Java Swing application and transitions it to Groovy, JRuby, and JavaScript. I can’t get enough of this kind of stuff, because it shows just how easy it can be to make the switch from Java to a dynamic scripting language (and back). I, of course, think the Groovy version is the best for me because it’s so similar in feel to the Java version. This is a huge win for me because it makes context switching simple and allows me to choose the language that is best for the problem I’m trying to solve. Really, Groovy is even better than that, because I can mix in static AND dynamic typing, so I can basically get the best of both worlds right in one.
Archives
- January 2012
- October 2011
- August 2011
- July 2011
- June 2011
- April 2011
- March 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- June 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
So, can you provide Stuart Halloway with a compelling example of when to mix static and dynamic typing? The comments on his post contain some examples:
http://www.relevancellc.com/2007/5/16/groovy-and-grails-three-worries
I would only be able to echo the things that Graeme and John already said on Stuart’s blog. Personally, I just feel comfortable with the idea of being able to type sometimes and not others. To me, it just feels right to go ahead and type my domain classes but not use typing as much elsewhere.
Stuart is probably right that mixing static and dynamic typing wouldn’t be enough to choose a language on, but that’s only one little nicety in Groovy.