4 ms·
Why do people advocate Python and not a dialect of Lisp for beginners? Are prefix notation and parentheses really that terrible in exchange for a completely uni
by hetid 12y ago
Why do people advocate Python and not a dialect of Lisp for beginners? Are prefix notation and parentheses really that terrible in exchange for a completely unified syntax?
- hcarvalhoalves 12y agoI believe Lisp is a good choice for beginners too, but it's two different approaches. Lisp is interesting for the theory behind it - you can introduce lambda calculus, parsers, AST, stacks while you teach the language, and the student will have a grasp of how the computer understands code. Python is a more hands-on approach - you just teach some syntax that reads like english and the student can put some libraries together and do something meaningful, the barrier is low and you get instant gratification, which is important to keep students motivated.
- bjt 12y agoWhen you show someone a mathematical formula using standard infix notation, and then want them to write a program to implement it, it's immensely helpful if the syntax of the language is close to the mathematical notation. Infix operators are a huge boon to readability for beginning programmers, especially those with some science/math background. This is the subject of some extended discussion in the new PEP proposing a Python infix operator for matrix multiplication. http://legacy.python.org/dev/peps/pep-0465/ http://legacy.python.org/dev/peps/pep-0465/