Why does not keyword parameter evaluate to String?

Consider the code below

julia> function foo(f;FuncType="UnivariateFunction")
foo (generic function with 1 method)

julia> function foo_backend(f;FuncType="UnivariateFunction")
           println("Function Type is ",FuncType)
foo_backend (generic function with 1 method)

julia> func1(x) = x^2
func1 (generic function with 1 method)

julia> func2(x,y) = x^2 + y^2
func2 (generic function with 1 method)

julia> foo(func2,FuncType="MultivariateFunction")
Function Type is MultivariateFunction

Why doesn’t the code “foo_backend(f,FuncType=FuncType)” evaluate to


when it is called with foo(func2,FuncType=“MultivariateFunction”)

I am just curious

I am not sure I understand your question, but in


the first FuncType is the name of the keyword argument, while the second FuncType (on the right hand side of the =) is just an expression like any other and will be evaluated as such — if there is not such variable, it will error.