Multiple languages exist because we can abstract away a lot of the nitty gritty of assembly

Language features help us express ourselves

OCaml

(* hello.ml *)
print_string "Hello World!\n"

Everything is an expression ()

  • Expressions evaluate to values ()
  • All values are expressions, but not vice versa
  • Expressions have types ()
  • e: t means expression e has type t (Cliff thing, not an OCaml thing)

1 + 3 is an expression with type int true is an expression with type bool + only works with integers! Not floats! +. is for floats - different function entirely

+: int -> int -> int = <fun>