Earlier quoted context omitted.
OCaml vs All: Good luck finding developers that will write quality code and not cost a fortune each.
It's not getting things done that matters. It's feeling superior to others that matters.
OCaml Programming: Correct and Efficient and Beautiful
41–50 of 251 posts
Re: OCaml Programming: Correct and Efficient and Beautiful
#42My introduction to programming course in my university was in OCaml. It was all downhill from there when it comes to the programming languages I had to use.
Which university? Does the course have a public webpage?
Re: OCaml Programming: Correct and Efficient and Beautiful
#43I learned some Haskell years ago but it didn't stick with me. Lately, I want to get back into functional programming to see whether I'm missing out on something. This book looks nice, and so does OCaml. Any suggestions on books, courses, or resources on this subject? Also, just to get proper motivation, why should I learn functional programming as a capable Software Engineer?
Re: OCaml Programming: Correct and Efficient and Beautiful
#44Every time I use recent "functional" languages (Rust, modern Typescript) I realise how great OCaml is
Have you tried F#?
But as an example when writing Typescript, I feel so frustrated of not having a clean way of doing pattern-matching
Re: OCaml Programming: Correct and Efficient and Beautiful
#45I found my experience trying to work with a large OCaml base a nightmare — when signatures changed in an unstable dependency (e.g. function argument removed and nested inside another), the errors spat out by the typechecker were utterly incomphrehensible. This was largely due to automatic currying in OCaml — if I have a function call "some_function arg1 arg2" and "some_function" adds a third argument, that call becom…
FWIW, F# is very similar to OCaml, but its error message in this case is usually quite clear. E.g. This expression was expected to have type 'int' but here has type 'string -> int'
But I got the error message
Error: This expression has type
((locl_ty * Tast.pos * ('ex, 'fb, 'en) Aast.expr_) list ->
Result_set.t)
list
but an expression was expected of type Result_set.t list
Type
(locl_ty * Tast.pos * ('ex, 'fb, 'en) Aast.expr_) list ->
Result_set.t
is not compatible with type Result_set.t
Which is not half as readable.Re: OCaml Programming: Correct and Efficient and Beautiful
#46I found my experience trying to work with a large OCaml base a nightmare — when signatures changed in an unstable dependency (e.g. function argument removed and nested inside another), the errors spat out by the typechecker were utterly incomphrehensible. This was largely due to automatic currying in OCaml — if I have a function call "some_function arg1 arg2" and "some_function" adds a third argument, that call becom…
Do you have a more precise example in mind? The example that you are describing should emit an error message of the form This expression has type type_of_arg_3 -> return_type but an expression of type return_type was expected which seem alright to me. (But I cannot not be called an OCaml aficionado). The type error might be delayed in sufficiently polymorphism context but that is a more infrequent occurrence (outside…
Re: OCaml Programming: Correct and Efficient and Beautiful
#47I did a lot of my PhD work in OCaml. I hated pretty much every minute of it compared to C++, when comparing the exact same algorithms aha.
Re: OCaml Programming: Correct and Efficient and Beautiful
#48I found my experience trying to work with a large OCaml base a nightmare — when signatures changed in an unstable dependency (e.g. function argument removed and nested inside another), the errors spat out by the typechecker were utterly incomphrehensible. This was largely due to automatic currying in OCaml — if I have a function call "some_function arg1 arg2" and "some_function" adds a third argument, that call becom…
> when signatures changed in an unstable dependency The problem is not OCaml here.