Consider the following LaTeX manuscript featuring a TikZ picture of two filled circles. The right circle is drawn inside a \pgfextra. The path's fill color is yellow!
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\path[fill=yellow] (-.5,0) circle(1)
\pgfextra{\fill (.5,0) circle(1);};
\end{tikzpicture}
\end{document}
It renders as
If we now replace the \pgfextra with a graph:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{graphs}
\begin{document}
\begin{tikzpicture}
\path[fill=yellow] (-.5,0) circle(1)
graph{""[circle,at={(.5,0)},minimum size=2cm,fill]};
\end{tikzpicture}
\end{document}
we obtain the picture
Now here's the paradox.
In both examples the path has the same form:
\path[fill=yellow] (-.5,0) circle(1) ...;
One would expect this to be implemented in one of two ways: either the option is executed at the beginning:
\pgfsetfillcolor{yellow}
\pgfpathcircle{\pgfpoint{-.5cm}{0cm}}{1cm}
...
\pgfusepath{fill}
or just before the path is used:
\pgfpathcircle{\pgfpoint{-.5cm}{0cm}}{1cm}
...
\pgfsetfillcolor{yellow}
\pgfusepath{fill}
The first alternative must be rejected, since then the first example would be implemented as follows
\pgfsetfillcolor{yellow}
\pgfpathcircle{\pgfpoint{-.5cm}{0cm}}{1cm}
% \pgfextra{\fill (.5,0) circle(1);}
\pgfpathcircle{\pgfpoint{.5cm}{0cm}}{1cm}
\pgfusepath{fill}
\pgfusepath{fill}
yielding the picture
But the second alternative must also be rejected, because then the implementation of the second example would see the graph created before the fill color has been set:
\pgfpathcircle{\pgfpoint{-.5cm}{0cm}}{1cm}
% graph{""[circle,at={(.5,0)},minimum size=2cm,fill]}
\pgfsetfillcolor{yellow}
\pgfusepath{fill}
and since a graph is locked in a TeX box upon creation, and since the visual appearance of a TeX box is finalized upon creation, the graph node would be filled with black, and the picture would look something like this
We have arrived at a contradiction!





\pgfextraandgraphI don't think this can be explained other than by delving to some degree into the implementation, but there's a difference between giving a thirsty man a glass of water and dropping him in the middle of the lake. – Evan Aad Aug 02 '17 at 18:52