En kodare


Anders Hovmöller
GitHub twitter email

OCaml — first impressions

2017-07-07

I’m doing research to try to find my “next language” after Python. I’ll publish an article on that eventually, but for now here are some of my reactions to OCaml:

➜ ~ ocaml foo.ml  
File "./foo.ml", line 3, characters 15-21:  
Error: This expression has type float -> float -> float  
 but an expression was expected of type  
 ('a ->  
 'b ->  
 'c -> 'd -> 'e -> 'f -> 'g -> 'h -> 'i -> 'j -> 'k -> 'l - > 'm) ->  
 'n ->  
 'a ->  
 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h -> 'i -> 'j -> 'k -> 'l -> 'm  
 Type float is not compatible with type  
 'a ->  
 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h -> 'i -> 'j -> 'k -> 'l -> 'm
« A case for a short form for argument labels Code generation is terrible and great »