2015-04-19 22:32:01 +00:00
|
|
|
From C++ std:
|
|
|
|
\begin{cppcode}
|
|
|
|
void pop();
|
|
|
|
\end{cppcode}
|
2015-04-20 13:08:25 +00:00
|
|
|
\pause
|
2015-04-19 22:32:01 +00:00
|
|
|
From the C FLINT library:
|
|
|
|
\begin{ccode}
|
|
|
|
void fmpz_mod_poly_add(
|
|
|
|
fmpz_mod_poly_t res,
|
|
|
|
const fmpz_mod_poly_t poly1,
|
|
|
|
const fmpz_mod_poly_t poly2);
|
|
|
|
\end{ccode}
|
|
|
|
\vspace{\baselineskip}
|
2015-04-20 13:08:25 +00:00
|
|
|
\pause
|
2015-04-19 22:32:01 +00:00
|
|
|
Regular C functions in real-world (omitting examples on purpose):
|
|
|
|
\begin{itemizep}
|
|
|
|
\item 100+ LOC
|
|
|
|
\item at least 7 ifs, 4 whiles, 12 variables, 1 goto
|
|
|
|
\item accesses both static and global variables
|
|
|
|
\item indenting level of 5 or more
|
|
|
|
\item a lot of memory management and custom-made error handling
|
|
|
|
\item references everywhere!
|
|
|
|
\end{itemizep}
|