|
Friday, August 29, 2003 |
Dynamically typed languages like Ruby and Python are getting quite
popular it seems. I'm still not convinced we should all move to
dynamically typed languages any time soon - however I see no
reason why we can't use both dynamically and statically typed languages and choose the best tool for the job.
I've wanted to use a cool dynamically typed scripting language
specifically for the Java platform for a little while. There's plenty
to choose from but none of them quite feel right - especially from the
perspective of a die hard Java programmer. Python and Ruby are both
pretty cool - though they are platforms in their own right. I'd rather
a dynamic language that builds right on top of all the groovy Java code
out there & the JVM.
Jython, beanshell and Rhino are quite close - but none of them quite
feel right for my needs. (JRuby looks dead, Jython's quite behind
Python though it is the closest to what I want right now). Apart from
beanshell, most of them are languages designed with other use cases or
criteria in mind and the bridge to the JVM was an afterthought and so
don't quite sit nicely in a Java (platform & language) developers
toolkit - even if thats just some minor syntax things (like __init__
and self in Jython).
So I've been musing a little while if its time the Java platform had
its own dynamic language designed from the ground up to work real nice
with existing code; creating/extending objects normal Java can use and
vice versa. Python/Jython's a pretty good base - add the nice
stuff from Ruby and maybe sprinkle on some AOP features and we could
have a really Groovy new language for scripting Java objects, writing
test cases and who knows, even doing real development in it.
I'm finding that most of the time spent in a TDD style development
model is actually coding the unit tests. There's typically lots of unit
test code for little application code. Also there does seem to be some
baggage when writing unit tests in java. This seems a great opportunity
for using a concise & powerful dynamically typed language. So the
initial idea was to
make a little dynamic language which compiles directly to Java classes
and provides all the nice (alleged) productivity benefits of python /
ruby but allows you to reuse, extend, implement and test your existing
Java code - and use that to write your unit tests. Add a little groovy
maven plugin and hey presto, we've boosted the TDD development cycle
and created a nice dynamically-typed alternative to Java along the way.
After some IRC chats with bob a new groovy language for the JVM has
started to take shape, called Groovy. Its still very early days and
much of this just exists on the GroovyWiki
though bob's started work on the lexer & I've started hacking some
GroovyTests (unit tests in groovy) together to test the Groovy language
implementation whenever we get the compiler/runtime working.
We'd love to hear any thoughts or ideas folks have - either via groovy-dev email list or GroovyWiki
or just via the comments on this blog entry. Please do add any thought you've got to the WishList page.
We're starting simple with
the nice tuples, sequences, maps from python & closures from ruby
and being concise & dynamically typed with a java-look-and-feel
though where we end up is anyones guess right now.
2:06:06 PM
|
|
© Copyright 2007 James Strachan.
|
|
|
|
|
|
August 2003 |
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
|
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
|
|
|
|
|
Jul Sep |
|
|
|
|
|
|