handouts/pep-ho.tex
changeset 476 7550c816187a
parent 471 135bf034ac30
child 481 e03a0100ec46
--- a/handouts/pep-ho.tex	Thu Nov 02 23:34:53 2023 +0000
+++ b/handouts/pep-ho.tex	Sat Nov 04 18:53:37 2023 +0000
@@ -180,10 +180,12 @@
 in advance!\bigskip
 
 \begin{tcolorbox}[colback=red!5!white,colframe=red!75!black]
-  I will be using the \textbf{\texttt{scala-cli}} REPL for scala, rather
+  I will be using the \textbf{\texttt{scala-cli}} REPL for Scala 3, rather
   than the ``plain'' Scala REPL. This is a batteries included version of
-  Scala and is easier to use. In fact \texttt{scala-cli} will replace
-  the ``plain'' Scala REPL in future versions. So why not using it now?
+  Scala 3 and is easier to use and install. In fact
+  \texttt{scala-cli} is designated to replace
+  the ``plain'' Scala REPL in future versions of Scala.
+  So why not using it now?
   It can be downloaded from:
 
   \begin{center}
@@ -193,13 +195,13 @@
 
 
 \noindent
-If you are interested, there are also experimental backend of Scala
+If you are interested, there are also experimental backends of Scala
 for generating JavaScript code (\url{https://www.scala-js.org}), and
 there is work under way to have a native Scala compiler generating
 X86-code (\url{http://www.scala-native.org}). There are also some
-tricks you can play with Scala programms running as native
+tricks for Scala programs to run as a native
 GraalVM~\hr{https://scala-cli.virtuslab.org/docs/cookbooks/native-images/}
-images.  Though be warned these backends are still rather beta or even
+image.  Though be warned these backends are still rather beta or even
 alpha.
 
 \subsection*{VS Code and Scala}
@@ -241,7 +243,7 @@
 \end{boxedminipage}
 \end{figure}  
 
-Actually \alert last year I switched to VS Codium, which is VS Code
+Actually \alert last year I switched to VS Codium as IDE for writing Scala programs. VS Codium is VS Code
 minus all the telemetry that is normally sent to Microsoft. Apart from
 the telemetry (and Copilot, which you are not supposed to use anyway),
 it works pretty much the same way as the original but is driven by a
@@ -254,7 +256,7 @@
 
 
 What I like most about VS Code/Codium is that it provides easy access
-to the Scala REPL. But if you prefer another editor for coding, it is
+to any Scala REPL. But if you prefer another editor for coding, it is
 also painless to work with Scala completely on the command line (as
 you might have done with \texttt{g++} in the earlier part of PEP). For
 the lazybones among us, there are even online editors and environments
@@ -505,13 +507,13 @@
 
 \subsection*{The Very Basics}
 
-Let us get back to Scala: One advantage of Scala over Java is that it
-includes an interpreter (a REPL, or
+Let us get back to Scala and \texttt{scala-cli}: One advantage of
+Scala over Java is that it includes an interpreter (a REPL, or
 \underline{R}ead-\underline{E}val-\underline{P}rint-\underline{L}oop)
 with which you can run and test small code snippets without the need
 of a compiler. This helps a lot with interactively developing
 programs. It is my preferred way of writing small Scala programs. Once
-you installed Scala, you can start the interpreter by typing on the
+you installed \texttt{scala-cli}, you can start the interpreter by typing on the
 command line:
 
 \begin{lstlisting}[language={},numbers=none,basicstyle=\ttfamily\small]
@@ -522,11 +524,14 @@
 scala>
 \end{lstlisting}%$
 
-\noindent The precise response may vary depending
-on the version and platform where you installed Scala. Make sure
-\texttt{scala-cli} uses Scala version 3. At the Scala
-prompt you can type things like \code{2 + 3}\;\keys{Ret} and
-the output will be
+\noindent The precise response may vary depending on the version and
+platform where you installed \texttt{scala-cli}. Make sure however that
+\texttt{scala-cli} uses Scala version 3---you can find the version
+number in the welcome message. Also note that at the first time
+\texttt{scala-cli} runs, it might download various components, for
+example the Scala compiler, Scala runtimes etc. Once
+\texttt{scala-cli} is up and running, you can type at the prompt
+expressions like \code{2 + 3}\;\keys{Ret} and the output will be
 
 \begin{lstlisting}[numbers=none,language={}]
 scala> 2 + 3