Slide 40
Slide 40 text
Optimistic inf
erence
$xs = [1, 2]; // $xs:int[]
$x = $xs[$i]; // $x:int
// In reality, if $i key is not in $xs,
// $x will be null, so the exact type
// if more like ?int, but most
// programs perform optimistic inference,
// where we omit some details...