(no title)
tegeek | 5 years ago
type Bottom = private Bottom of Bottom
Modeling any kind of data is intuitive and simple. This is why ML languages (F#, oCamel etc.) shines in industries where you've complex data like Finance. Reading any F# code is like reading a novel. It starts with modeling of data and small functions. Then these small functions and data evolves into bigger features. File by file you keep moving upwards. For example if you are writing a Json parser in F#, you start with Modeling Json data first. And here it is
type JsonValue = | String of string | Number of decimal | Float of float | Record of properties:(string * JsonValue)[] | Array of elements:JsonValue[] | Boolean of bool | Null
Then everything starts from here.
sevensor|5 years ago
bsaul|5 years ago
The syntax may not be as elegant as ML languages, but it's still by far the best amongst the "mainstream" languages.
GiorgioG|5 years ago
Let's not kid ourselves - iOS is the #1 reason Swift has any popularity at all. Outside of the Apple ecosystem Swift is practically non-existent.