Skip to content

Commit 0390a62

Browse files
amadiobernhardmgruber
authored andcommitted
Update advice for conditional (ternary) operator
- Be more explicit about what is considered obvious. - Make the point of not nesting them more prominent.
1 parent 7fc55d4 commit 0390a62

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

talk/basicconcepts/control.tex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@
6262
\end{cppcode*}
6363
\end{exampleblock}
6464
\pause
65-
\begin{alertblock}{Do not abuse}
65+
\begin{alertblock}{Do not abuse it}
6666
\begin{itemize}
67-
\item explicit ifs are easier to read \\
68-
\item use only when obvious and not nested
67+
\item Explicit \mintinline{cpp}{if}s are generally easier to read
68+
\item Use the ternary operator with short conditions and expressions
69+
\item Avoid nesting
6970
\end{itemize}
7071
\end{alertblock}
7172
\end{frame}

0 commit comments

Comments
 (0)