Re: What does TYPE SAFE mean?
"Hendrik Boom [email protected] [ocaml_beginners]" <[email protected]> Sat, 13 Feb 2016 10:15:15 -0500
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Feb 13, 2016 at 01:01:31AM -0600, Douglas Lewit [email protected] [ocaml_beginners] wrote: > What do people mean when they say that Ocaml is a "type safe" language? To put it very informally, it means that every variable and expression has a type (such as int, or int->int etc.) and that during execution, you are guaranteed that the values of these variables and expressions are indeed values of the correct types. The compiler will prevent anything violating these constraints from getting through to execution. Though occasionally, as a real-world compromise, there will have to be run-time checks. And, occasionally, oe must escape to code not written on OCaml, and then the OCaml compiler cannot ensure type-correctness. -- hendrik