Re: cyclic value construction ("let rec")

From: Markus Mottl (mottl@miss.wu-wien.ac.at)
Date: Thu Apr 06 2000 - 17:12:36 MET DST

  • Next message: Andrew Conway: "RE: to have labels or not"

    > Alas, it can do a lot of harm. For one thing, you could break type
    > safety this way, just like with polymorphic references:

    Oh, right... - I could have thought earlier of this eternal problem of
    destructive update and polymorphic typing! Once again it seems to me that
    there is little place to "wiggle" at the current implementation of the
    typing discipline without losing its important properties...

    So my "quick hack" version is indeed potentially explosive and will only
    work correctly (= type safe) as long as the user does not put polymorphic
    values into the datastructure and does not do "evil" things then.

    It would be possible to allow this "const cast" with records that have a
    non-parameterized type - which would be pretty boring and might possibly
    make the language less regular: beginners might be confused why "casting
    away" mutability is allowed in some cases but not in others.

    Best regards,
    Markus Mottl

    -- 
    Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl
    



    This archive was generated by hypermail 2b29 : Mon Apr 10 2000 - 01:31:26 MET DST