Scott Hickey | 15 May 15:56
Picon
Favicon

Re: [groovy-dev] I'll give a Groovy presentation at the Jazoon'08

Regarding putting types on functions, I used to do that for every method on every Groovy class in my project.
Now, I only declare types on methods that serve as an external API. I changed my thinking after the first
major refactoring I had to do. I found that most of my refactoring pain disappeared when I stop putting
types everywhere. 

 Scott Hickey
Senior Consultant
Object Partners, Inc.

----- Original Message ----
From: Martin C. Martin <martin@...>
To: dev@...
Sent: Thursday, May 15, 2008 8:02:56 AM
Subject: Re: [groovy-dev] I'll give a Groovy presentation at the Jazoon'08

Aaron Digulla wrote:
> Quoting "Martin C. Martin" <martin@...>:
> 
>> Do you think it would be appropriate to point out these advantages,
>> along with the disadvantages?
> 
> You're right. I wanted to avoid doing a second "what's great about 
> groovy" presentation (Ted Neward already does that on Monday and I 
> probably can't compete with him :) and while doing so, I went too far. 
> Thanks for pointing that out.

No problem.  And thanks for allowing us to look over your presentation 
before you give it.  You seem genuinely interested in telling the 
audience what they should know if they're considering Groovy, which I 
suspect is why you're so willing to discuss the presentation in the 
first place.

I think a lot of what you've experienced is exposure to a different 
culture.  I always find this opens my eyes: things I'd taken for granted 
as positives in my old culture are now seen as both good and bad.  I 
used to believe that static typing meant increased productivity, because 
the compiler could catch problems and save me lots of debugging time. 
But after using a number of dynamic languages, I can see the costs: 
reading C++ or Java code now looks like talking to a child, since you 
have to spell out every little thing, even things that should be obvious.

I've gotten into a habit of putting types on most function declarations, 
both arguments and return.  A function declaration is a unit of 
abstraction, and callers generally don't have to look inside it to know 
how to call it.  But in the function body I usually skip the types, to 
make it more readable.

Out of curiosity, does anybody else use that pattern?

Best,
Martin

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane