haskell-lectures/VL1/content/VL1_why_haskell3.tex

13 lines
763 B
TeX
Raw Normal View History

You need to change only one single line in such a C function. You have to know:
\begin{itemizep}
\item does the order of function calls matter?
\item how does the change effect the memory management? Do we have memory leaks? Do we access invalid memory?
\item does it change the state of static or global variables?
2015-04-20 13:08:38 +00:00
\item does it change the state of out-parameters?
\item if it changes any of those states, is the function still correct?
\item what happens if the program flow reaches this code-path with variable X in that particular state, while variable Z is NULL, and...
\item did you just nuke a small former Soviet state?
\end{itemizep}
\vspace{\baselineskip}
\slidep
Conclusion: you really need to understand the complete environment of that line/function.