I wrote some simple code like this:
var v = 100
proc build_fun(a: int): proc (): int =
var
b = 20
proc foo(): int =
b = b + 1
result = a + b
result = foo
var
f = build_fun(10)
f2 = build_fun(10)
echo f()
echo f()
echo f2()
echo f2()
Run
What I like about TypeScript is that I don't have to give build_fun a type at
all. I somehow think that the best code is the one you don't have to write.
And even Haskell introduced type holes at some point meaning you can type parts
of a function and let the compiler figure out the holes.
How do you feel about this ?