Practical OCaml
OCaml is a general-purpose programming language, which means that you can program anything in it. However, programming languages are often designed with certain problem domains in mind, and OCaml has areas in which it excels more than others.
One of these is in the area of “safe” applications (used here to indicate more than securityrelated safety). Not only is OCaml garbage collected, but most types are boxed. This means that buffer overruns and similar runtime failures cannot happen in OCaml programs. Safety in OCaml extends beyond this, though. The static typing and compile-time checks by the OCaml compiler make certain classes of errors impossible. Type conversion or mismatch errors cannot happen in OCaml because automatic type coercions cannot happen.
OCaml code is also verifiable. There are automated proof utilities that can test your code and verify that it is type correct. This testing goes beyond syntax checkers such as Lint; it delves into static analyses of programs on a level that other languages (except maybe Ada) can only hope to accomplish some day.
All this safety also comes with speed. The optimizing compiler generates very fast code. OCaml entries in the International Conference on Functional Programming (ICFP) programming contest have taken many prizes over the years.
With speed and safety also comes a highly developed module system and standard library. The module system provides incremental compilation and type signatures. The type signatures go well beyond what can be accomplished with header files and promote data privacy by enforcing function visibility at compile time. This means that private functions stay private—the compiler makes it so. Without unsafe pointers (which do not exist in OCaml), this security is strong.
Download Link
All rights reserved. All other trademarks appearing on on this site are the property of their respective owners. We don't store any files on this server, we just index the link from the other website.