|
|
|
|
|
by stabbles
1057 days ago
|
|
> Python arguments are evaluated when the function definition is encountered This is a giant pain. Easy to miss. Sometimes forces you to deal with Optional[Something] instead of just Something. Compare with Julia where default arguments are evaluated ... very late: julia> f(a, b, c, d = a * b * c) = d
f (generic function with 2 methods)
julia> f("hello", " ", "world")
"hello world"
that's really neat. |
|
Looking at your Julia example, this seems much more friendly and less surprise and error-prone.