Questions tagged [ocaml]
Use for questions about the language formerly known as Objective Caml, an implementation of the Caml programming language
12
questions
86
votes
19
answers
71k
views
Why isn't OCaml more popular?
I've always heard that C is the language of choice to use for embedded systems, or anything that needs to run at maximum speed. I never developed a fondness for C, mostly because I don't like pointer ...
22
votes
2
answers
4k
views
Type checking and recursive types (Writing the Y combinator in Haskell/Ocaml)
When explaining the Y combinator in the context of Haskell, it's usually noted that the straight-forward implementation won't type-check in Haskell because of its recursive type.
For example, from ...
17
votes
2
answers
6k
views
OCaml criticism: is it still valid?
I am a complete newbie with OCaml. I have recently stumbled into this page listing a good amount of criticism towards OCaml.
Seeing that the page it quite old (2007): which of the bullets points ...
11
votes
4
answers
2k
views
Is OCaml any good for numerical analysis? [closed]
I'm currently using C and some FORTRAN to solve numerically systems of differential equations.
I'm a bit fed up with both of these languages but I need to have some (rather) efficient code... I'm ...
8
votes
0
answers
221
views
Why does OCaml's (and F#'s) type inference algorithm need tagging functions as recursive? [duplicate]
From Real World OCaml (beta):
OCaml distinguishes between non-recursive definitions (using let) and
recursive definitions (using let rec) largely for technical reasons:
the type-inference ...
7
votes
0
answers
1k
views
Hoes dows the productivity incidence of Lisp and OCaml compare? [closed]
I am about to start a new project and I cannot decide if I should pick OCaml or Lisp for the project. My main concern is about the difference of productivity — if any.
I program OCaml since 1998 ...
5
votes
2
answers
434
views
Is it normal for names in functional programming to be extremely terse?
I am working on a compilers assignment in OCaml, and the following is an example of the pre-written code in said assignment:
(* Build a CFG and collection of global variable definitions from a stream *...
5
votes
1
answer
370
views
Is private global mutable state ever appropriate, namely when used to prevent API misuse?
I am writing a type checker for an ML dialect that involves generating "fresh" (new and unique) "type variables" (values representing unknowns). My strategy, and the strategy that seems to be used in ...
4
votes
1
answer
450
views
What are some practical uses of Generalized Algebraic Datatypes? [closed]
All tutorials on GADTs that I've seen (in Haskell, Coq and Idris) use one same exapmle of a well-typed interpreter to show how GADTs can be useful, where you use the type index to encode the type of ...
3
votes
1
answer
1k
views
What is the difference between Applicative and Generative Modules, and Type Classes?
Reading the comments to this blog post made me realize I don't know much about some really interesting functional mechanisms between languages like Haskell, OCaml and Standard ML. I'd love a high-...
1
vote
1
answer
142
views
how do interpreters differ for statically- or dynamically-typed languages?
Writing an interpreter for a dynamically typed language usually involves creating an Environment, a data structure which stores mappings of variable names to their values. Values are boxed in some ...
1
vote
1
answer
128
views
How to deal with hard configurations at the component level?
I distinguish three organisation levels while programming: the library level, the component level and the application level. A library defines functions to solve a range of related problems or ...