jastrachan | 17 Nov 11:58 2004
Picon

Re: Keyword: "any" over "def"


On 17 Nov 2004, at 10:39, Jochen Theodorou wrote:
> Guillaume Laforge schrieb:
> [...]
>> I don't think var (or any variant) fits the purpose for methods, 
>> because, after all, a method is not a variable! Thus, I don't think 
>> the following really makes sense: var createMailLabel(). Whereas any 
>> createMailLabel() means that it can return "any" kind of object.
>
> why using the same keyword for methods/functions and variables? I'm a 
> bit too new to groovy, so I suggest you/someone are making examples 
> here showing the current ambiguity factor.

FWIW Sam likes var for variables and def for functions.

James
-------
http://radio.weblogs.com/0112098/


Gmane