« Return to Thread: “final” and read only properties.

Re: “final” and read only properties.

by Robert Fischer :: Rate this Message:

Reply to Author | View in Thread

I'd vote against "final" locking down variables in Groovy in general.  That's a kind of type safety
that I don't think would offer much to Groovy code: what would we really gain?

~~ Robert Fischer, Smokejumper IT Consulting.
Enfranchised Mind Blog http://EnfranchisedMind.com/blog

Grails Expert Retainer Services
http://smokejumperit.com/grails-retainer/


Luke Daley wrote:

> Hi all,
>
> There was recently a thread discussing the “final” modifier. It
> mentioned that someday it is hoped that this shares the semantics of
> “final” in Java.
>
> I tend to use “final” to generate read only properties quite a lot and
> don't use it for the semantics of “final” in Java.
>
> If this is going to be changed, a new forward compatible mechanism for
> read only properties should be introduced
> _soon_.---------------------------------------------------------------------
>
> 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


 « Return to Thread: “final” and read only properties.