From 5cf2a63e73d045117bf652167ce06044e759cc8a Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Sun, 20 Sep 2026 16:08:43 +0200 Subject: [PATCH] [CD] OCAML basics --- core/cd/summary/parts/ocaml/00_basics.tex | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/cd/summary/parts/ocaml/00_basics.tex b/core/cd/summary/parts/ocaml/00_basics.tex index 6f6fdfc..56b6ffe 100644 --- a/core/cd/summary/parts/ocaml/00_basics.tex +++ b/core/cd/summary/parts/ocaml/00_basics.tex @@ -2,3 +2,10 @@ OCAML is a compiled, functional programming language and a descendant of the Met In contrast to other functional programming languages (such as Haskell), it is actually used in the wild by more than two people. \inputcodewithfilename{ocaml}{}{code/ocaml/00_basics.ml} + +OCAML is dynamically typed (i.e. types don't \textit{have} to be annotated), but they can be, if you so choose. +As with Python and all other languages where type annotation is optional, you are strongly encouraged to annotate types, especially for more complex expressions, +as that can massively reduce the likeliness of errors. + +The first graded assignment's first 300 ish lines also give you a very neat overview over how OCAML works, +so absolutely read through those.