[erlang-questions] "Erlang as a First Language" -- crazy? or just stupid?
Mon Dec 21 20:44:04 CET 2009
Seasonal greetings from Denmark.
I would like to second Vasilij based on my own track record.
Back in 1992 at the Technical University of Denmark (DTU) at the Informatics
line of study were taught SML in the first semester in the spirit of what
later became a book:
It allowed us to accomplish a lot more than when I years later taught Java
to freshmen. Yes, you can use Java as a first language, but for a large
portion of the students there will be major parts that are more or less
Voodoo. To the defense of Java there is the ability to have fun with GUI,
but it comes at the expense of having to live with half-baked understanding
of programming and Java.
After learning SML we finished the first semester by writing a parser,
scanner and interpreter for a simple imperative language. That is simply so
much above what can be accomplished with Java or similar languages.
On this foundation we went on to learn some 10-15 different languages in 5
years since DTU at that time had not converted to mono-languaism (i.e.,
Java) WITHOUT any problems. I have yet to see similar ease of learning a new
language for students starting with Java et al.
Regarding unlearning imperative habbits: for some this can be quite hard.
With Erlang you have to learn both functional programming and concurrency in
order to write elegant programs or at least programs that does not inflict
too much pain on yourself. As long as you think like an imperative person
that is simply not easy to grasp. I would still encourage people to invest
in the learning as it will make the code you write in other languages
better! BTW: this holds true for any new paradigm you pick up, so even after
seeing the light (i.e., learning Erlang) there are still things out there
that should be learnt!!
For newcomers to programming I would recommend something like the SML book
above or Francesco and Simon's Erlang book. Other functional languages most
likely have books that will do for them.
A bonus would be to be able to write a GUI easily since that can be used to
make some fun games which normally gets most people energised - I used that
format when I taught Java at DTU and they sticked to that theme for 6 years!
On Mon, Dec 21, 2009 at 20:12, Vasilij Savin <>wrote:
> I do not think that teaching people C first is a good idea. C requires
> a mental leap towards understanding computer internals. Students have to
> grapple with a lot of C specifics, compared to learning how to program. I
> have heard opinions that Python could be a good language to be taught as
> first one, it is simple and friendly enough for newcomers.
> In Uppsala University, students are taught ML as the first programming
> language that is simple enough to learn in its entirety within one
> I am quite convinced that functional programming is important to teach in
> the beginning of the career. It allows to write efficient and compact code.
> Recursion is usually just mentioned when learning C-like languages because
> it is practically impossible to use it in real applications.
> Recursion, tail-recursion, pattern matching are really powerful concepts
> that students should be taught as soon as possible.
> Just some insights from still a student.
> Vasilij Savin
More information about the erlang-questions