Python is wierd!

Remco Gerlich scarblac-spamtrap at pino.selwerd.nl
Tue Jul 25 13:33:25 EDT 2000


Jonathan wrote in comp.lang.python:
> I'm making this judgment from a perspective of a newbie to python,
> comparing to my experience with these 2 languages(back when i first
> started learning them). I'm thinking back which one has been easy to
> pick up so far, and which one helps me to understand programming
> principles. Things like strict typing, declaration of
> functions/variables, difference btwn pass-by-value or pass-by-
> reference, static or instance variables, (etc) seems easier to explain
> to a newbie in Pascal or Java (of course i dun mean to use pascal for
> serious programming purposes).

Of course. And backtracking cuts are easier to explain in Prolog.

Those things aren't basic programming principles - algorithms are, the whole
concept of algorithms. Strict typing, declaration, pass-by-, static variables,
they're all just elements of the particular languages you name. But they're
not the basic principles. To me, Python has less irrelevant things to learn,
so you can learn about algorithms faster. Almost immediately.

How does java "Hello World" go again? Something like

public class HelloWorld {
   public static void main(String[] args) {
      System.out.println("Hello World!");
   }
}

Look at all the irrelevant language-specific stuff the newbie has to know
about!

Now show the newbie how a sorting algorithm for a list of numbers works;
and compare to the Python version :).

You think Python is weird - well, yes, it's different from C, Pascal and
stuff. Those are very traditional procedural languages. But languages are
supposed to be different, otherwise there would be no point :-). It would
be good to look at some others, like Lisp, Haskell, Prolog...


-- 
Remco Gerlich,  scarblac at pino.selwerd.nl
"This gubblick contains many nonsklarkish English flutzpahs, but the
 overall pluggandisp can be glorked from context"  (David Moser)



More information about the Python-list mailing list