Why is an int in OCaml only 31 bits?

This is called a tagged pointer representation, and is a pretty common optimization trick used in many different interpreters, VMs and runtime systems for decades. Pretty much every Lisp implementation uses them, many Smalltalk VMs, many Ruby interpreters, and so on. Usually, in those languages, you always pass around pointers to objects. An object itself … Read more

F# changes to OCaml [closed]

This question has been answered for some time now, but I was quite surprised that most of the answers say what OCaml features are missing in F# – this is definitely good to know if you want to port existing OCaml programs to F# (which is probably the motivation of most of the referenced articles). … Read more

Sneaking lenses and CPS past the value restriction

The value restriction is a limitation of the OCaml type system that prevents some polymorphic values from being generalized, i.e. having a type that is universally quantified over all type variables. This is done to preserve soundness of the type system in the presence of mutable references and side effects. In your case, the value … Read more

In Functional Programming, what is a functor?

The word “functor” comes from category theory, which is a very general, very abstract branch of mathematics. It has been borrowed by designers of functional languages in at least two different ways. In the ML family of languages, a functor is a module that takes one or more other modules as a parameter. It’s considered … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)