[plt-scheme] Perplexed Programmers

From: Marco Morazan (morazanm at gmail.com)
Date: Sat Sep 1 17:26:13 EDT 2007

On 9/1/07, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
> Dynamic typing is the default and makes writing simple and
> nearly useful programs easy at the beginning. What do you
> mean w/ your question. -- Matthias
>
>

Here we have a dynamically typed language over which we impose a
static typing discipline to develop code. This provides a context for
learning that is effective and that, no doubt, facilitates the
transition to statically typed languages. In essence, we are arguing
for the importance of structural invariants which are not enforced by
languages such as Scheme.

Dynamically typed langauges, however, are powerful precisely because
they do not require the enforcement of structural invariants. We can
develop prototypes, for example, without having to enforce structural
invariants. This is useful especially when we are not sure what the
shape of the data is needed (e.g. vague specifications) or when we
need to quickly develop a prototype (e.g. to determine the shape the
data must have). Then there are the more subtle issues of being able
to write useful programs that could never be proven type safe.

So, students ought to know about dynamic typing (and gradual typing
etc.). When do readers of this list feel it is best to "formally"
introduce students to the idea of dynamic typing with the goal or
writing code?

Cheers,

Marco


Posted on the users mailing list.