[Lazarus] *** GMX Spamverdacht *** Re: Teaching Pascal at College

Jürgen Hestermann juergen.hestermann at gmx.de
Fri Oct 21 11:38:23 CEST 2016


Am 2016-10-21 um 10:33 schrieb Lars via Lazarus:
 > How do you know some clever student wouldn't end up using recursion
 > without any loop involved?

How can a student think about loops and recursion at all if he does not
get the information that they exist (in the specific programming language)?
So the "clever" student that does something that has not been taught
in a course may not need the course at all.
But what about those who want to learn in a course?
If you do not give essential information about a programming
language then you do not need the course at all.


 > And that leads to a question, should recursion even be used in teaching or
 > are loops easier to reason about?
 > I find recursion, although intellectually interesting, kind of difficult
 > to map in the mind, and I'm skeptical of all the functional languages
 > using recursion, almost abusively.

I prefer loops instead of recusion too, mostly because
they are easier to understand and debug.
Nevertheless, in some special situations I also use recursion,
especially, when interim results need to be stored
which is easier on the stack.
Handling additional data (on the heap) is cumbersome too.

And when teaching a programming language that allows recursion
then of course it should be taught.


More information about the Lazarus mailing list