Improve java comparison slides

This commit is contained in:
Julian Ospald 2015-04-16 20:10:23 +02:00
rodič 27211d40fe
revize 94ef5eefa5
V databázi nebyl nalezen žádný známý klíč pro tento podpis
ID GPG klíče: 220CD1C5BDEED020
1 změnil soubory, kde provedl 9 přidání a 3 odebrání

12
VL1.tex
Zobrazit soubor

@ -135,17 +135,23 @@ Sort of, because:
\begin{itemize}[<+->]
\item it improves APIs compared to C, since you can hide or encapsulate information in the state of an object
\item it has a garbage collector, so you don't need to worry too much about memory
\item an experienced programmer will find it easier to manage side-effects in Java, because you can e.g. have every impure functions throw an IO exception
\end{itemize}
\onslide<+->
Unfortunately, we:
\end{frame}
\begin{frame}
\frametitle{Why haskell? (ctn.)}
Unfortunately, with java we:
\begin{itemize}[<+->]
\item now got even more states to keep track of (intellectual complexity?)
\item have clouded the program flow... it's now about object-interaction with their explicit and implicit states
\item have clouded the program flow... it's now about object-interaction with their explicit and implicit states and because of the increase of indirection, it might get even harder to do actual abstraction
\item still have \textbf{side effects} everywhere: one object changes the state of another and vice versa, may arbitrarily write to the hard drive, do kernel calls or launch a missile
\end{itemize}
\onslide<+->
Some parts of the implicit state machine have been made explicit by modelling classes, but it's still there and we have to deal with it, because we are modelling everything around states. Wouldn't it be nice if we could just forget about the global state machine? Maybe there is even a way to remove side effects and have more "predictability"?
\onslide<+->
\\
\vspace{\baselineskip}
We are lucky. There is. It's called \textbf{Haskell}.
\end{frame}