Log in

No account? Create an account
Random thoughts about groovy - The tissue of the Tears of Zorro [entries|archive|friends|userinfo]

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Random thoughts about groovy [Feb. 3rd, 2008|08:07 pm]
[Tags|, , , , , ]

So, I'm learning a new scripting language called Groovy. Yes I know I've not finished learning ruby... but I'm flitting at the moment. I'm also thinking of JavaFX.

So far, from what I've seen I'm not hugely impressed. Looking at the page outlining some of the differences between groovy and python, it mentioned that the equivalent of "range(n)" was "0..n". This isn't entirely true. The slice returns a slice object, as best I can tell.

Now that's the other thing, I'm running from a groovy shell (groovysh) and it just doesn't strike me as being as much of a "live" language as python. Being honest, that's what I love about the python language so much - I can play around with it in real time, and I can inspect it to bits. I can use things like type, dir and .__doc__ to figure out what's happening. As a result of all of that, I feel like I know python like the back of my hand. Looking now at the reflection stuff of Groovy, it appears only to be as strong as Java's reflection techniques, which really aren't that strong if you compare them to python.

Still, I'll learn a bit more and see how it goes.

[User Picture]From: ebel
2008-02-03 10:32 pm (UTC)
as strong as Java's reflection techniques

As someone who had to use Java's reflection stuff for a project, I can just say that it's shite.
(Reply) (Thread)
[User Picture]From: tearsofzorro
2008-02-03 11:02 pm (UTC)
I thought as much, but not being an expert in Java's reflection stuff, I just wasn't sure. I thought it might just have been how I used it.

Oh, and you might find this article interesting. (It's a bit like eval() for Java, but like all things in Java, unnecessarily complicated when compared to other languages)
(Reply) (Parent) (Thread)
[User Picture]From: ebel
2008-02-04 04:13 pm (UTC)
The main problem i found with the Java reflection stuff was caused by some problems in the java type system. Mostly because there is a different between and int and an object. This causes headaches when looking at things dynamically. In python, everything's an object.

And yes it is incredibly verbose and complicated.
(Reply) (Parent) (Thread)