D in the ix magazine about "programming today"

Daniel de Kok me at nowhere.nospam
Mon Jan 4 09:46:54 PST 2010


On 2009-12-28 12:53:28 +0100, retard <re at tard.com.invalid> said:
> I'm not saying that everyone should learn Haskell, but I know it's
> possible to learn stuff like Curry-Howard isomorphism, hylomorphisms,
> monads, monad transformers, comonads, and analysing amortized costs of
> algorithms at that age. It's just dumb to assume that young people can't
> learn something as complex as static types!

With respect to education: I think that exposing different programming 
paradigms to students has a lot of merit. Each paradigm has different 
structuring of data and execution, and is taylored to different 
problems. Pick a language for each paradigm that is as simple as 
possible, but still powerful enough to solve practical problems. This 
will avoid students to be overwhelmed by the multitude of possible 
construction combinations. E.g. a plausible language selection with 
varying typing disciplines would be:

- Haskell or ML (functional programming, static typing)
- Prolog (declarative/logics programming)
- Python or maybe Ruby (object-oriented programming, dynamic typing)

While D2 is nice for people who want great performance without many of 
the downsides of C++, I do not think it makes a good first language for 
education. Various stumbling blocks I see include asymmetry of 
struct/class, immutable (which tends to creep in everywhere, and can be 
cast away with undefined behavior), static vs. dynamic arrays, use of 
multiple paradigms (structured, OO, functional), and not so strong 
typing. Besides availability of books, tools, and libraries of course.

Of course, some of the practical problems may be solved in short term, 
if Andrei's book sparks more interest from the wider programming 
community.

-- Daniel



More information about the Digitalmars-d-announce mailing list