From: utzoo!decvax!harpo!floyd!cmcl2!philabs!sdcsvax!ajh Newsgroups: net.lang Title: Re: Difficulty of recursion Article-I.D.: sdcsvax.67 Posted: Wed Mar 23 15:34:03 1983 Received: Fri Mar 25 08:03:34 1983 References: ihuxr.366 iwlc7.146 Is recursion all that difficult? I don't think so. When I was 12, I took an assembly language class with almost no prior computer experience. One assignment was to calculate fibonacci (sp?) numbers using recursion. I spent about three days hacking at it to no avail, so I asked the professor. In about five minutes, everything boiled together and it all made sense. Since then, I've seen recursion explained many ways. Those who explain it simply seem to be able to teach it to others easily. Those who call it a "funny" way to write code never seem to be able to teach it to anyone else. (Incidently, I sat in on a Pascal class where the professor taught recursion during the first session. Later, when he introduced iteration, all the students asked,"Why not use recursion? This is really bizarre.") The moral is that recursion isn't hard, it just has to be explained well. Will compilers stop kids from learning about computers? Again, I don't think so. When I was in seventh grade, I learned Pascal. Although I didn't like waiting for the compiler, I didn't become a lawyer, either. Now, I can't speak for all kids, but for me, compiling was no big deal. Kids will want to learn no matter how hard you try to stop them. Do interpreters teach bad habits? I don't think its the interpreter as much as the language. BASIC, for example, tends to discourage commenting. A well commented program will take several times the execution time. Furthermore, it makes writing modular code difficult. The gosub-return sequence provides for no parameters or local variables. My friends who were weaned on BASIC tend to produce sloppier code than those who were weaned on a structured language. That may just be their own fault, but I think the language has something to do with it. Oh well, enough rambling. That's my $0.01x10^-23 worth. Alan J. Hu ucbvax!sdcsvax!ajh (or something like that.)