>>7 What do you find difficult to understand about the type system?
Name:
Anonymous2015-05-29 19:28
>>8 You're not gonna believe this, but the only way to fix this is to... start using it! Incredible yet true.
Name:
Anonymous2015-05-29 19:36
check'em
Name:
Anonymous2015-05-29 19:49
>>10 Build an ecosystem and they will come. You won't get many OCaml users though.
OCaml's OO is really just a marketing symbol. It's there, it's good as far as these things go. But nobody uses it. SML could be living in this paradise, but like in old times The Jealous God wouldn't tolerate anything He thought was Imperfect. Meanwhile in OCaml we have an Idol of Satan in our courtyard which everyone agrees not to worship... and we have enough people around for that to mean something.
Name:
Anonymous2015-05-29 20:52
>>12 Just use Haskell. What's the point of a functional language if it's not pure and bloated with all those ;;;;;
Full disclosure: $ head -33 look-ma-no-hands.ml module type Num = sig type t val add : t -> t -> t end
let (+) (implicit N : Num) = N.add
implicit module Num_int = struct type t = int let add = Pervasives.(+) end
implicit module Num_float = struct type t = float let add = Pervasives.(+.) end
module type Show = sig type t val show : t -> unit end
let print (implicit S : Show) x = S.show x
implicit module Show_int = struct type t = int let show x = string_of_int x |> print_endline end
implicit module Show_int = struct type t = float let show x = string_of_float x |> print_endline end
Name:
Anonymous2015-05-31 9:20
>>26 Wow, cool. So pretty much OCaml has both ML modules and typeclasses now? Because implicit module ... = struct looks terribly like instance ... where
Btw, that last block in your code probably should've been
implicit module Show_float = struct type t = float let show x = string_of_float x |> print_endline end
Name:
Anonymous2015-05-31 10:07
Is it just me or does ``OCaml'' sound like it should be a dialect of Perl?
>>32 You may include them if you wish, but they are not required. Basically what you are saying right now is all mice are grey. I'm saying some mice are brown. And you said bullshit and showed me a picture of a grey mouse. Understand?
Name:
Anonymous2015-05-31 20:26
>>32 You're just jelly that OCaml is a greater demon with control over imps.