The documentation on OptionsPattern
leaves me with some unanswered questions. From the example section:
Options[f] = {a -> a0, b -> b0};
f[x_, OptionsPattern[]] := {x, OptionValue[a]}
f[7, a -> uuu]
(* {7, uuu} *)
I don't think using global symbols for the named Options is a great idea so I wonder how to localise them / make sure there isn't going to be any conflict with other definitions in the same document?
a=1;
f[7, a -> uuu]
(* {f[7, 1 -> uuu], a0} *)