On Fri, Jul 29, 2011 at 9:53 AM, Paul Phillips <pa...@improving.org> wrote:
> On 7/29/11 9:40 AM, Brian Hurt wrote:
>>
>> I see why Scala made the choice to drop totality checking- you need
>> global knowledge to determine what states/types are possible for a
>> given data type.  But note that what you've declared too hard for the
>> compiler is still necessary for the programmer to do- your code still
>> has to work correctly with all possible states it can find itself in.
>
> I don't think anyone has declared it too hard for the compiler.  Rather, it
> is impossible for the compiler.

Assuming your type system isn't Turing complete, with total program
knowledge it is possible to enumerate all types the program generates.
 At which point it is possible for the compiler to do totality
checking.  Maybe not easy, but possible.  However, this means the
programmer also needs total program knowledge in order to write
correct code.

>> You've made the expression problem much, much harder to solve, and
>> sacrificed a huge quanta of correctness, on the altar of OO
>> compatibility.
>
> I don't think OO compatibility has anything to do with it.
>

Then why did Scala make that decision?

Brian

-- 
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to jvm-languages@googlegroups.com.
To unsubscribe from this group, send email to 
jvm-languages+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.

Reply via email to