3 ms·
I love static typing and stronger type systems, but I'm also mainly a data dev guy (that do CRUDs and data manipulation, plus app/web development). The big tro
by mamcx 10y ago
I love static typing and stronger type systems, but I'm also mainly a data dev guy (that do CRUDs and data manipulation, plus app/web development).
The big trouble with inflexibles types is that work against data manipulation. Data using maybe not, but is a mile easier to do database development in python than in F#.
My ideal setup is a strict-types first and dynamic optional, so I can do:
row = MakeRow()
row?first_name = "Jhon"
row?last_name = "Doe"
row?fullName = fun row:Row -> row?first_name + " " + row?last_name
and stuff like that...
But still keep the type system everywhere!
fun sum(a, b:Int):Int -> a + b
Mainly, because readability. I think that is better when you can stare at a fragment of code and extract as much info as posible. Type annotations help that.
That infuriate me about F#. I do python, and in both basic code "look the same". But I hate that F# know the types of things but do not tell me! (without a IDE!) and I still need to track down the flow of code to figure out things.
Type inference must be local, imho. Or not at all...