haskell-lectures/VL1/content/VL1_what_is_haskell4.tex
2015-04-20 00:51:14 +02:00

19 lines
658 B
TeX

\emph{Referential transparency}, as in:
\slidep
\begin{itemizep}
\item everything (variables, data structures...) is \emph{immutable}
\item expressions never have side-effects (remember: mathematical functions)
\item same input $\mapsto$ same output... \emph{always}!
\item replace a function with it's (return) value? Yes. What happens in C or java if you do that? Remember \code{void pop();}?
\end{itemizep}
\slidep
\vspace{\baselineskip}
possible benefits?
\begin{itemizep}
\item parallelism
\item equational reasoning and refactoring
\item less bugs!
\end{itemizep}
\slidep
\vspace{\baselineskip}
Question: call-by-value? call-by-reference? call-by-need?