[Tutor] if-else statements
alan.gauld at freenet.co.uk
Sat Oct 15 13:10:42 CEST 2005
> and it's Java/C++ all the way. I am becoming convinced that lines of
> code are not only related to the number of bugs and development speed,
> but learning speed as well. Too much time tripping over syntax and
> you miss the important bits.
It depends. I learned to program in Pascal and a more fussy language
syntractically you can't find.butt that fussy syntax really reinforced in
my mind concepts such as Strong Typing, and the difference between
function and procedure, argument and parameter, passing by value
or reference, etc.
But in C++ many of the syntactic errors encounteredcare unrelated
to good practice and the fix is not to "do it right" but to apply a horrble
hack like a type cast! In other words the compiler encourages bad
habits not good ones. But that is a reflection on the design of the
languages, neither C++ nor Java were designed for teaching,
Pascal was. The former assume an experienced, understanding
practitioner. Pascal assumes a beginner to the extent that experienced
programmers find it frustratingly binding and inflexibvle.
One of the really clever features of Python is that it can fulfill both
roles well because it encourages good practice while supporting
the features needed for the real world too.
Author of the learn to program web tutor
More information about the Tutor