Consider this:

someval="foo"
def f(x::Int, @maybe y::String=someval) = (x,y)
f(1) => (1, "foo")
someval="bar"
f(2) => (2, "foo")   # should be (2, "bar")

def g(x) = x + " seen"
def h(x::String, @maybe y::String=g(x)) = y
h("foo") # gives an error but should be "foo seen"

See what I am getting at now about when default is evaluated?

Reply via email to