Questions tagged [ocaml]
Use for questions about the language formerly known as Objective Caml, an implementation of the Caml programming language
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 *...
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 ...
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 ...
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-...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...