Index: doc/theses/jiada_liang_MMath/relatedwork.tex
===================================================================
--- doc/theses/jiada_liang_MMath/relatedwork.tex	(revision 566cc33ae374c458f72fbc1e3db85c204344608c)
+++ doc/theses/jiada_liang_MMath/relatedwork.tex	(revision f6321173aa4ceab077c8b556511650b082af253e)
@@ -18,5 +18,5 @@
 \end{comment}
 
-Enumeration types exist in many popular programming languages, both past and present, \eg Pascal~\cite{Pascal}, Ada~\cite{Ada}, \Csharp~\cite{Csharp}, OCaml~\cite{OCaml} \CC, Go~\cite{Go}, Java~\cite{Java}, Modula-3~\cite{Modula-3}, Rust~\cite{Rust}, Swift~\cite{Swift}, Python~\cite{Python}.
+Enumeration-like features exist in many popular programming languages, both past and present, \eg Pascal~\cite{Pascal}, Ada~\cite{Ada}, \Csharp~\cite{Csharp}, OCaml~\cite{OCaml} \CC, Go~\cite{Go}, Haskell~\cite{Haskell}, Java~\cite{Java}, Modula-3~\cite{Modula-3}, Rust~\cite{Rust}, Swift~\cite{Swift}, Python~\cite{Python}.
 Among theses languages, there are a large set of overlapping features, but each language has its own unique extensions and restrictions.
 
@@ -24,10 +24,10 @@
 \label{s:Pascal}
 
-Classic Pascal has the \lstinline[language=pascal]{const} declaration binding a name to a constant literal/expression.
+Classic Pascal has the \lstinline[language=Pascal]{const} aliasing declaration binding a name to a constant literal/expression.
 \begin{pascal}
 const one = 0 + 1;   Vowels = set of (A,E,I,O,U);   NULL = NIL;
 		 PI = 3.14159;   Plus = '+';   Fred = 'Fred';
 \end{pascal}
-This mechanism is not an enumeration because there is no specific type (pseudo enumeration).
+As stated, this mechanism is not an enumeration because there is no specific type (pseudo enumeration).
 Hence, there is no notion of a (possibly ordered) set, modulo the \lstinline[language=pascal]{set of} type.
 The type of each constant name (enumerator) is inferred from the constant-expression type.
@@ -139,5 +139,5 @@
 Ops : array( 0..3 ) of Operator;
 Ops := @"+-*/"@;            -- string assignment to array elements
-Ops := @"+-" & "*/"@;   -- string concatenation and assignment
+Ops := "+-" @&@ "*/";   -- string concatenation and assignment
 \end{ada}
 Ada's @Character@ type is defined as a character enumeration across all Latin-1 characters.
@@ -215,30 +215,33 @@
 \label{s:C++RelatedWork}
 
-\CC has the equivalent of Pascal typed @const@ declarations \see{\VRef{s:Pascal}}, with static and dynamic initialization.
+\CC enumeration is largely backwards compatible with C, so it inherited C's enumerations with some modifications and additions.
+
+\CC has aliasing using @const@ declarations, like C \see{\VRef{s:Cconst}}, with type inferencing, plus static/dynamic initialization.
+(Note, a \CC @constexpr@ declaration is the same @const@ with the restriction that the initialization is a compile-time expression.)
 \begin{c++}
-const auto one = 0 + 1;					$\C{// static initialization}$
-const auto NULL = nullptr;
-const auto PI = 3.14159;
-const auto Plus = '+';
-const auto Fred = "Fred";
-const auto Mon = 0, Tue = Mon + 1, Wed = Tue + 1, Thu = Wed + 1, Fri = Thu + 1,
+const @auto@ one = 0 + 1;				$\C{// static initialization}$
+const @auto@ NIL = nullptr;
+const @auto@ PI = 3.14159;
+const @auto@ Plus = '+';
+const @auto@ Fred = "Fred";
+const @auto@ Mon = 0, Tue = Mon + 1, Wed = Tue + 1, Thu = Wed + 1, Fri = Thu + 1,
 				Sat = Fri + 1, Sun = Sat + 1;
-int sa[Sun];
-const auto r = random();				$\C{// dynamic initialization}$
-int da[r];								$\C{// VLA}$
+void foo() {
+	const @auto@ r = random();			$\C{// dynamic initialization}$
+	int va[r];							$\C{// VLA, auto scope only}$
+}
 \end{c++}
 Statically initialized identifiers may appear in any constant-expression context, \eg @case@.
-Dynamically intialized identifiers may appear as array dimensions in @g++@, which allows variable-sized arrays.
-Interestingly, global \CC @const@ declarations are implicitly marked @static@ (@r@ rather than @R@).
+Dynamically initialized identifiers may appear as array dimensions in @g++@, which allows variable-sized arrays.
+Interestingly, global \CC @const@ declarations are implicitly marked @static@ (@r@, read-only local, rather than @R@, read-only external)
 \begin{c++}
 $\$$ nm test.o
 0000000000000018 @r@ Mon
 \end{c++}
-
-\CC enumeration is largely backwards compatible with C, so it inherited C's enumerations.
-However, the following non-backwards compatible changes are made.
-
+whereas C @const@ declarations without @static@ are marked @R@.
+
+The following non-backwards compatible changes are made \see{\cite[\S~7.2]{ANSI98:C++}}.
 \begin{cquote}
-7.2 Change: \CC objects of enumeration type can only be assigned values of the same enumeration type.
+Change: \CC objects of enumeration type can only be assigned values of the same enumeration type.
 In C, objects of enumeration type can be assigned values of any integral type. \\
 Example:
@@ -254,5 +257,5 @@
 
 \begin{cquote}
-7.2 Change: In \CC, the type of an enumerator is its enumeration.
+Change: In \CC, the type of an enumerator is its enumeration.
 In C, the type of an enumerator is @int@. \\
 Example:
@@ -269,5 +272,4 @@
 Taking the size of an enumerator is not a common C coding practice.
 \end{cquote}
-
 Hence, the values in a \CC enumeration can only be its enumerators (without a cast).
 While the storage size of an enumerator is up to the compiler, there is still an implicit cast to @int@.
