Browse Source

Improve java comparison slides

Julian Ospald 4 years ago
parent
commit
94ef5eefa5
No account linked to committer's email address
1 changed files with 9 additions and 3 deletions
  1. 9
    3
      VL1.tex

+ 9
- 3
VL1.tex View File

@@ -135,17 +135,23 @@ Sort of, because:
135 135
 \begin{itemize}[<+->]
136 136
 \item it improves APIs compared to C, since you can hide or encapsulate information in the state of an object
137 137
 \item it has a garbage collector, so you don't need to worry too much about memory
138
+\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
138 139
 \end{itemize}
139
-\onslide<+->
140
-Unfortunately, we:
140
+\end{frame}
141
+
142
+\begin{frame}
143
+\frametitle{Why haskell? (ctn.)}
144
+Unfortunately, with java we:
141 145
 \begin{itemize}[<+->]
142 146
 \item now got even more states to keep track of (intellectual complexity?)
143
-\item have clouded the program flow... it's now about object-interaction with their explicit and implicit states
147
+\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
144 148
 \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
145 149
 \end{itemize}
146 150
 \onslide<+->
147 151
 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"?
148 152
 \onslide<+->
153
+\\
154
+\vspace{\baselineskip}
149 155
 We are lucky. There is. It's called \textbf{Haskell}.
150 156
 \end{frame}
151 157