[clean-list] Re: "unique" dual to "final"?

Carlos Aya carlosayam at yahoo.com.au
Fri May 18 03:22:29 MEST 2007


a continuation...

Actually, in a language with call-by-reference and
"final" the compiler will have to check that in the
scope of a "final v", it is used only once in the RHS
of assigment or a call-by-reference position; and that
inside the called method it is used once and so on...
hum, very similar to uniqueness checking ah... (or
preclude the use of final in call-by-reference, of
course, which would be the cheap/easy approach)

cheers
Carlos

--- Carlos Aya <carlosayam at yahoo.com.au> wrote:

> Hi,
> 
> I just tought that in Java one can declare a
> variable
> as final and the compiler checks for you that you
> only
> uses x in the RHS of assigment once. I was just
> wondering if this is somehow related (dual?) to the
> uniqueness check in uniqueness typing the compiler
> does... after all, the assignment operator in non-FP
> languages is *the* operator that destroys state.
> Just
> a thought :)
> 
> cheers
> Carlos
> 
> 
>      
>
___________________________________________________________________________________
> How would you spend $50,000 to create a more
> sustainable environment in Australia?  Go to Yahoo!7
> Answers and share your idea.
>
http://advision.webevents.yahoo.com/aunz/lifestyle/answers/y7ans-babp_reg.html
> 
> 



      ___________________________________________________________________________________
How would you spend $50,000 to create a more sustainable environment in Australia?  Go to Yahoo!7 Answers and share your idea.
http://advision.webevents.yahoo.com/aunz/lifestyle/answers/y7ans-babp_reg.html



More information about the clean-list mailing list