jastrachan | 26 Jan 11:04 2005

Re: [groovy-dev] Pragmatic Groovy Development and Project Management

On 25 Jan 2005, at 13:58, John Wilson wrote:
> On 25 Jan 2005, at 13:19, jastrachan@... wrote:
>>> James this is all very well but it brings is to the real point of 
>>> the discussion.
>>> People are being given the impression that New Groovy is just a kind 
>>> of cleaned up version of Old Groovy. that there will be minor 
>>> changes but they will not really have much of an impact. It's really 
>>> a kind of rolled up bugfix. Unfortunately this is just not true. New 
>>> Groovy has fundamental breaking changes to the semantics of Old 
>>> Groovy.
>> What semantics are breaking?  Apart from the delegate stuff, which 
>> few people other than you are using, what else is breaking? Sure 
>> we're temporarily putting the builder stuff to one side until we've 
>> the core of New Groovy on a solid, stable base, then we're adding 
>> something back in its place.
> The semantics of Builder and GPath are changing because of the removal 
> of the delegate and the introduction of optional parentheses in no 
> parameter calls. That's quite a chunk of usage (especially Builders).

GPath doesn't use the delegate - its only used by the builders

>>>  I would estimate that 80% of all the Groovy code I have ever 
>>> written will be broken by New Groovy. Now we can have perfectly 
>>> reasonable discussions about whether this is a good or bad things, 
>>> but we can't escape the fact that New Groovy is substantially 
>>> different to Old Groovy. I think that the members of the Groovy 
>>> community are entitled to be made aware of this fact and I don't 
>>> think that they have really grasped the nature and extent of the 
>>> changes up to now.
>> 80% come on John. Hardly anyone but you uses the delegate mechanism 
>> thats hidden inside Closure. Sure some stuff will break - and we'll 
>> find out how much by putting all the old Groovy test cases through 
>> the Groovy New parser, but this magical 80% figure is massively 
>> pessimistic and not realistic to at least any of the groovy I write.
> It's really not just me. From the messages I see on the mailing list 
> and the private emails I get there are quite a few people using 
> XML-RPC, StreamingBuilders and XMLSlurper.

I don't see why all of these libraries can't be ported over to the new 
builder stuff when we figure out what it is.

> All of these are broken to a greater or lesser extent by New Groovy. I 
> have no idea how much work must be done to fix the breakage. It looks 
> like the StreamingBuilders (which are one of the few bits of the 
> distribution actually written in Groovy) will just have to be junked. 
> To my horror I discover that a couple of people are using this code in 
> production. Anybody using SwingBuilder, or SWST builder are also using 
> code which relies on the delegate mechanism. The 'with' hack (one of 
> Wirth's many really bad ideas) required user code to change it's not 
> just the Builder mechanism which changes behind the scenes.

I've already said that we need to put in place a builder mechanism and 
we will - as its definitely the most broken parts of Groovy and needs 
fixing. Unfortunately thats gonna mean a minor syntax change. 
(Hopefully the content of the markup can stay the same, its just the 
start/end of the markup that might differ - e.g. with(exp) rather than