News for hackers. Stuff that matters.
Re:Oxide: A Formal Semantics for Rust by ernst_klim on Thursday March 14, 2019 @12:04PM (#19390498)
>but OCaml is much noisier than Haskell in my opinion.

I would rather say explicit, and that was a breath of fresh air to me after Haskell. As for your example, how many instances do you need to write all the type classes you need?

In OCaml I could just write all the functions I need in a file, and this file-module would implement all the signatures, thanks to the structural typing, now condiser:

    type 'a t
    val bind : 'a t -> ('a -> 'b t) -> 'b t
    val apply : ('a -> 'b) t -> 'a t -> 'b t
    val map : ('a -> 'b) -> 'a t -> 'b t
    val show : 'a t -> ('a -> string) -> string
    val return : 'a -> 'a t
instead of

    instance Functor a => Functor (Type a) where
       fmap        :: (a -> b) -> f a -> f b

    instance Applicative a => Applicative (Type a) where
       <*>         :: f (a -> b) -> f a -> f b

    instance Show (Type a) where
       show        :: a -> string

    instance Monad...

which is more verbose?

There are no comments on this comment yet.