"They must have been writing some pretty simple programs up until this point, if they haven't been using variables yet."
In functional languages like Lisp, variables are basically avoided as much as possible, so it's actually possible to learn quite a lot without even learning how to use variables.
Do you realise that there are pure functional languages like Haskell where variables don't even exist? :-)
But you always have to remember to use the right tool for the job. If a recursive way would be more fun but an iterative way would be easier to implement or more efficient or more readable, then iterative should be the tool you choose.
But if you are just learning, you should try to get yourself comfortable with recursion. Understand it, use it, love it.
We learned this after having extensive knowledge of Java and C++. This is a whole other paradigm, not beginners programming. Variables aren't that central in Lisp.
@EdgeNicx I learned this first thing, so to me, this was "beginner's programming". :P
Ehal256 9 months ago
Damn, my spine aches every time he uses the board.
felipecotti 11 months ago
@glowbot: "They must have been writing some pretty simple programs up until this point, if they haven't been using variables yet."
Chuck Moore has written a CAD application almost without variables. With a hex editor. Try to beat that!
Tia1ko 1 year ago
@fragglet
Yup, I've programmed in Haskell and Prolog and Erlang. They are good functional languages. :-)
Lambda calculus and such.
They just aren't very popular in commercial programming.
glowbot 1 year ago
@andiejs brilliant yes, but dont get carried away.
highlander2107 1 year ago
"They must have been writing some pretty simple programs up until this point, if they haven't been using variables yet."
In functional languages like Lisp, variables are basically avoided as much as possible, so it's actually possible to learn quite a lot without even learning how to use variables.
Do you realise that there are pure functional languages like Haskell where variables don't even exist? :-)
fragglet 2 years ago
sussman is brilliant. and sexy.
andiejs 3 years ago
I agree, recursion is fun and powerful.
But you always have to remember to use the right tool for the job. If a recursive way would be more fun but an iterative way would be easier to implement or more efficient or more readable, then iterative should be the tool you choose.
But if you are just learning, you should try to get yourself comfortable with recursion. Understand it, use it, love it.
glowbot 4 years ago
I actually love recurrsion, one is just neat and two if you know how to do it its is very powerful
lobreiter1025 4 years ago
We learned this after having extensive knowledge of Java and C++. This is a whole other paradigm, not beginners programming. Variables aren't that central in Lisp.
EdgeNicx 4 years ago
They must have been writing some pretty simple programs up until this point, if they haven't been using variables yet.
But it is definitely good for a beginner to start at the beginning. Get a strong basis to build on.
I remember teaching iterative loops and recursive loops to my little brother, using factorial. He's in grade school. He said it blew his mind. :)
glowbot 4 years ago
Why aren't my lecturers as enthusiastic as this?
pythonbyte 4 years ago