[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with field initialization: Proposal

This page is part of the web mail archives of SRFI 76 from before July 7th, 2015. The new archives for SRFI 76 contain all messages, not just those from before July 7th, 2015.



Andre van Tonder <andre@xxxxxxxxxxxxxxxxxxx> writes:

>  Again, the comparison breaks down with examples like:
>  
>   class Foo {
>     int a;
>     int b;
>     
>     public int foo-a () { return a }
>     public int foo-b () { return b }
>   
>     Foo(int a, int b) {
>       int common = gcd (a, b); 
>       if (b == 0)
>         { this.a = 1;
>           this.b = 0 }
>       else 
>         { this.a = a / common;
>           this.b = b / common}
>     }
>   }
>   
>   which cannot currently be accomodated with the draft suggestion.  

Something got lost in the thread here:  It started with your trying to
argue that *your* suggestion was similar to Java, not that the draft
was dissimilar to it.  The latter just happened to hold for the
particular example.  This Java code has shape similar to your example,
but it still does things by name rather than by position.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla