I have been experimenting with the \newif construction in plain \TeX. To keep my experiments from clashing with plain \TeX, I changed the definition slightly to
\outer\def\znewif#1{\count255=\escapechar \escapechar=-1 \expandafter\expandafter\expandafter \edef\zif#1{true}{\let\noexpand#1=\noexpand\iftrue}% \expandafter\expandafter\expandafter \edef\zif#1{false}{\let\noexpand#1=\noexpand\iffalse}% \zif#1{false}\escapechar=\count255} % the condition starts out false \def\zif#1#2{\csname\expandafter\ifz\string#1#2\endcsname} {\uccode`1=`i \uccode`2=`f \uppercase{\gdef\ifz12{}}} It seemed to me that \edefs could be changed to \defs if I omitted the \noexpands. I made the changes, as follows,
\outer\def\znewif#1{\count255=\escapechar \escapechar=-1 \expandafter\expandafter\expandafter \def\zif#1{true}{\let#1=\iftrue}% \expandafter\expandafter\expandafter \def\zif#1{false}{\let#1=\iffalse}% \zif#1{false}\escapechar=\count255} % the condition starts out false \def\zif#1#2{\csname\expandafter\ifz\string#1#2\endcsname} {\uccode`1=`i \uccode`2=`f \uppercase{\gdef\ifz12{}}} and it worked the same way, and
\znewif\ifalpha {\tt\meaning\ifalpha} {\tt\meaning\alphatrue} {\tt\meaning\alphafalse} gives the same output. So why does the definition of \newif use \edef and \noexpand?
\newifgiven in plain.tex does use\def. Where did you find this\edefversion?\definstead of\edef. This is in the CTAN texbook.tex as well.