+The advantage of shallowly embedding a language in a host language is its
+extendability. It is very easy to add functionality and compile time checks
+of the host language guarantee whether the functionality is available when used.
+Moreover, the language is type safe as it is directly typed in the host
+language.
+
+The downside of this method is extending the language with views. It is nearly
+impossible to add views to a shallowly embedded language. The only way of
+achieving this is by decorating the datatype for the \gls{EDSL} with all the
+information for all the views. This will mean that every component will have to
+implement all views rendering it slow for multiple views and complex to
+implement.
+
+\section{Class based shallow embedding}
+The third type of embedding is called class based shallow embedding and has the
+advantages of both shallow and deep embedding. In class based shallow embedding
+the language constructs are defined as type classes. The same language is shown
+with the new method in Listing~\ref{lst:exclassshallow}.
+
+This type of embedding inherits the easiness of adding views from shallow
+embedding. A view is just a different data type implementing one or more of the
+type classes as shown in the aforementioned Listing where an evaluator and a
+pretty printer are implemented.
+
+Just as with \glspl{GADT} in deep embedding type safety is guaranteed. Type
+constraints are enforced through phantom types. One can add as many phantom
+type as necessary. Lastly, extensions can be added easily, just as in
+shallow embedding. When an extension is made in an existing class, all views
+must be updated accordingly to prevent possible runtime errors. When an
+extension is added in a new class, this problem does not arise and views can
+choose to implement only parts of the collection of classes.