This question already has an answer here:
Mathematica Version 11.2 desktop / Windows 10 Pro 64-bit
(* Assume y is undefined. *) (* ?y and ??y leave y undefined. *) ?y Information::notfound: Symbol y not found. ??y Information::notfound: Symbol y not found. (* AtomQ[y] has a side effect of defining y. *) In:= AtomQ[y] Out= True In:= ??y Global`y
Why does AtomQ[y] define y?
Is this "By Design" i.e. a carefully thought out deliberate feature?
One would think that if y is not defined, AtomQ[y] would output this as an error.
Why else would one be using AtomQ[y] unless they thought y was already defined.
It seems like a dangerous side effect which makes debugging a nightmare.
Is there a property of the Kernel to enable or disable functions like AtomQ from defining symbols?
In general, which built-in functions leave symbols undefined and which do not?
Thanks in advance.