ApproxFun.jl
ApproxFun.jl copied to clipboard
Remove `Fun(exp)` convenience constructor?
f = Fun(exp)
and x = Fun()
is a very convenient as a debug tool, but the semantics are pretty horrible: why would asking to create a Fun
to represent exp(x)
assume that the domain is -1 .. 1
?
A case could be made that the user should always specify the domain. Or rather,
domain(f::Function) = error("Domain cannot be inferred for $(typeof(f))")
Fun(f::Function) = Fun(f, domain(f))