Learning With D

bearophile bearophileHUGS at lycos.com
Mon May 23 12:53:32 PDT 2011


Daniel Gibson:

> > - I appreciate Python significant indentation a lot, but I've seen it cause problems to some students.
> 
> What kind of problems? (related to tabs vs spaces?)

Tabs Vs spaces is not a big problem once you have told students to set up all their editors to never emit a tab :-) So this is not the real problem.
Different people have very different brains, some people find easy certain things and other people find easy other things. A good teacher must adapt himself/herself/hirself to the brain of the different students. Significant indentation has some good advantages, it reduces noise, it makes the semantics of the code the same of what you see, etc. But some programming newbies just aren't precise enough, they lose control and count of indentations, etc. For them spaces are nothing, they don't even see them, so for them braces are probably better, despite the increase in noise.


> > - Dynamic typing is handy, but it makes it a bit harder to learn the discipline of types.
> 
> Yeah, I personally don't like dynamic typing at all.

We are discussing about a language used as first programming language. What's good for an programmer that is programming since two years is sometimes not the best for a newbie and vice versa too. Finding a good balance for newbies between Pascal/Java-style boring and stupid static typing, full type inference as in ML, and full dynamic typing as in Python, is not easy.


> I strongly disagree. The first language they learn should *not* be
> agnostic to case, so they learn that case matters (because it does in
> most languages).

Most languages are strict in their case. So sooner or later a programmer must learn to tell apart cases of keywords and variables. But the case of keywords is _not_ essential to learn the basics of programming. There are so many things to learn in the beginning. And Pascal has being used to successfully teach generations of programmers. So while I respect your point of view, I think this is something different teachers are allowed to disagree on :-)

Bye,
bearophile


More information about the Digitalmars-d-announce mailing list