State
View
Update
init
Events
i.e. very much like a certain flavour of React
1
1
1
1
1 + 1 = 2
1 + 1 = 2
1
2
2
2 * 2 = 4
1 + 4 = 5
String test = null;
//vs
test = NothingC#: null inhabits every nullable type including String
Elm: Nothing only inhabits the Maybe type, there are no null strings, only strings inside Maybes
int? test = null;
Console.Write(test.Value);
//Kaboom! InvalidOperationException
test :: Maybe Int
test = Nothing
Debug.log "test" test
//Outputs Nothing
Are maybes like Nullables?
No - there is no unsafe equivalent of .Value