I think they are caught in between a rock and a hard place. Their main
impetus for being Java compatible is so that a Groovy newbie can copy
over a Java class and then make it more Groovy. I don't think Graeme
et al. really intend for people to continue coding Java in Groovy, but
to incrementally embrace the Groovy way of doing things; on the other
hand, they want Java developers to switch over and try it out. Either
route, they're going to get complaints from somebody. I remember that
the Java 'for' loop got pulled early on, but then they ended up
putting it back later because people complained that it made it hard
for migration.

That said, I'm not sure that 'valid java is valid groovy' is a
'central tenet'. I think the tenet is for Groovy to 'seamlessly
integrate with all existing Java objects and libraries', which is
different.

-Greg


On Jan 14, 9:46 am, Reinier Zwitserloot <[email protected]> wrote:
> A long time ago, when I read about groovy, I remember reading about a
> central tenet of the groovy language being: Existing java language
> should also be valid groovy.
>
> This struck me as pretty dumb at the time, and still does: There are
> plenty of weird things in java which I *really* don't want to see
> repeated in another language, such as '==' being used for object
> identity (an operation absolutely nobody ever uses - something that
> CLEARLY should have been offloaded to System.objectsAreIdentical(a, b)
> or some such).
>
> I also know it's not actually true (the equals(SomehingThatIsntObject)
> java puzzler would actually work as you expect in groovy, because
> groovy effectively uses reflection to handle every call, at least in
> spirit, whereas java only checks the type and 'hardcodes' the target
> method, but that means that java code run as groovy code isn't exactly
> equal).
>
> Is this still the case?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to