3 ms·
If you want to learn how a computer works, I'd agree that BASIC is a great way to go about it. A processor pulls instructions out of memory and executes them.
by jluxenberg 17y ago
If you want to learn how a computer works, I'd agree that BASIC is a great way to go about it. A processor pulls instructions out of memory and executes them. The instructions mutate the state of the machine to produce a result. BASIC models this imperative process in very plain, easily understood text.
However, if I was going to teach something about programming to a novice I'd try to get them to start thinking functionally from the beginning. All this imperative crap is how you implement the abstract model of what you are trying to compute on the hardware. Why get bogged down in the details? Show them a recursive data structure or algorithm and get them to understand it. Have them run it on paper not by thinking about what registers or variables you are modifying, but rather what the expression tree looks like when the recursive algorithm is evaluated.
I think if my first language had been SML or a LISP I'd have had an easier time later on in my programming career.
- ramchip 17y ago"Lisp programmers know the value of everything but the cost of nothing" Functional programming is a good paradigm but not a panacea, and imperative programming isn't crap. It has its uses. I like FP, but sometimes I'm embarrassed by how some people put it on a pedestal, like for OOP before...