Name: Anonymous 2017-02-02 10:34
@davetchepak "What can C# do that F# cannot?"
NullReferenceException :-)
Educating the imperative gorillas about sum types:
https://chadaustin.me/2015/07/sum-types/
@davetchepak "What can C# do that F# cannot?"
NullReferenceException :-)
check everything for null a hundred timesIts checked when its needed, and often function have special "default behavior" with null. If you afraid of NULL so much you can force get_focused_window to return Default_Window dummy object instead of NULL.
sum types don't have anything to do with OOP polymorphismThis is OOP polymorphism with syntax sugar, the case is the static method dispatch on overload of window - which is exactly the same as close_window(Window) C code.