News for hackers. Stuff that matters.
Re:The Rust Platform by catnaroek on Thursday July 28, 2016 @04:55AM (#12179133)
Seems a lot more cumbersome than the direct ML solution:

    signature ORD =
    sig
      type t
      val <= : t * t -> t
    end
    
    functor RedBlackSet (E : ORD) :> SET =
    struct
      type elem = E.t
      
      datatype set
        = Empty
        | Red of set * elem * set
        | Black of set * elem * set
      
      (* ... *)
    end
    
    structure Foo = RedBlackSet (Int)
    structure Bar = RedBlackSet (Backwards (Int))
    
    (* Foo.set and Bar.set are different abstract types! *)
Re:The Rust Platform by wyager on Thursday July 28, 2016 @02:27PM (#12182093)
That is more elegant! But do you think they're functionally more or less equivalent?
Re:The Rust Platform by catnaroek on Thursday July 28, 2016 @03:19PM (#12182478)
Assuming you don't mind plumbing value-level proxies all over the place, it's indeed functionally equivalent.