Mutating functions in keyword arguments give quite an issue due to how it’s parsed. The following example was noticed:
https://github.com/JuliaDiffEq/DiffEqBase.jl/issues/18
callback = ContinuousCallback(condtion,affect_bounce!,rootfind,save_positions,affect_neg! = affect_negative!)
is fine, but
callback = ContinuousCallback(condtion,affect_bounce!,rootfind,save_positions,affect_neg!=affect_negative!)
errors because Julia reads affect_neg!=affect_negative!
as having a !=
. Does this just mean we should avoid the !
in keyword arguments? Or is this a parser issue that should be fixed?