« Return to Thread: annotations or traits to better scale scala up

Re: annotations or traits to better scale scala up

by Daniel Sobral :: Rate this Message:

Reply to Author | View in Thread

On Wed, Jun 3, 2009 at 3:47 PM, Marcus Downing <marcus@...> wrote:

>
>
> Walter Smith wrote:
>>
>> Immutable: The class guarantees that it recursively has no variables and
>> is purely functional. (I think this is a must!)
>
> In most cases, this could be derived by the compiler rather than needing to
> be specified manually.
>
> What would you do with this metadata? How would it be treated differently?

I don't know what Walter has in mind, but to me it seems obvious that
the compiler ensures at compile time that your class is, in fact,
purely functional, by checking "recursively" all its component
classes. Useful against changes in external classes.

--
Daniel C. Sobral

Something I learned in academia: there are three kinds of academic
reviews: review by name, review by reference and review by value.

 « Return to Thread: annotations or traits to better scale scala up