forked from gdecuzzi/2014-Flamel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proposedSolution.tex
46 lines (36 loc) · 3.69 KB
/
proposedSolution.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
\section{A Customized Programming Environment}
\label{sec:environment}
Beginner programmers are likely to require more guidance and make more mistakes than experienced programmers.
Therefore, we think that is much to gain from a good programming environment which structures the programming experienced and helps the students to identify common mistakes.
The Wollok programming environment includes a lot of features that provide guidance to the student.
\emph{Content assist} shows the students what are his possibilities at any moment and feeds automatically into the code the most usual constructs,
allowing the student to concentrate less on syntax and more in the modelling of the exercise problem.
\emph{Quick-fixes} allow Wollok not only to highlight problems in the student's code but also to propose automatic solutions for some usual mistakes.
\emph{Advanced code navigation} and \emph{smart reference searches} allow the programmer to better understand the dependencies in his program.
\np{¿Se les ocurre cómo mejorar eso?}
Moreover, \emph{automatic class diagrams} provide a high level view of the program and also helps understanding.
% Detect mistakes
Also, the programming environment has many tools intended to help detecting mistakes, even while the student is writing code.
\emph{Syntax highlighting} helps identify the most simple mistakes by providing immediate feedback when something is not right.
Moreover, the environment provides \emph{real-time highlights} for syntactic mistakes.
Finally, the \emph{type inferer} allows to detect more subtle mistakes.
All these tools allows the student to gain more control of his code, keeping him away from feeling lost,
which is otherwise a common situation for a student walking his first steps into programming.
% Este no sé cómo ponerlo, es muy crítica al smalltalk.
% 8-reducir errores frustrantes: se cancela la edicion por tener 1 solo editor de metodo por ves (poder visualizar más que un sólo método simul), evitar errores de imagenes)
\medskip
% Type inferer
The type inferer is one of the most distinctive characteristics of the Wollok programming environment.
We think that type inference is key to a simple programming environment.
On one side, it allows to detect lots of common mistakes \emph{before running the program}:
if an object does understand a message, if a wrong argument is passed, if incompatible types are mixed or even miss-spellings.
In environments without this capability it takes more time to detect errors.
Moreover, it is not uncommon that a type mistake produces a runtime error in a place different from where the mistake was done, producing confusion.
Still, providing a type inferer for a language such as Wollok has many subtleties, which deserves an independent study \cite{passerini_nicolas_extensible_2014}.
On one side we require it to be able to work without type annotations and at the same time provide feedback useful for an inexperienced programmer.
On the other side, the type system is rather complex;
for example, the presence of stand-alone objects requires the type system to handle \emph{structural types}, since a named type system would not allow them to be treated polymorphically.
Also, we want to be able to treat polymorphically stand alone objects with class-based objects.
Implementation details are described in \secref{implementation}.
\subsection{Checks and Validations}
The IDE provides a way of showing some interesting checks and validations. This validations are organized and showed in a common way, using a dedicated section of the user interface for their display. In this way the IDE can be used to teach main concepts, not only showing syntax errors. Some of the errors are described in the \secref{ChecksAndValidations}