And that's exactly how I think people should not learn |
It's how we all learn. The only difference is the scale on which we do it.
- you know that "example" is a string
- you know that strings are arrays of characters.
- you know that characters are represented digitally by numerical values
- you know that numerical values are represented by series of bits
- you know that bits are represented by different voltages running through electrical components.
- you know that voltage is the carrier bandwidth of an electrical charge
- you know that electrical charges can be of electrons or ions
- you know that electrons are negatively charged particles that orbit the neuleous of an atom
- etc
There's always something lower. There's always something more detailed. Everything is abstracted. The question is... where do you draw the line? And it's not a question that can be answered the same for everyone -- different people learn different ways.
But I can tell you, I've noticed that people (generally) learn best going top->down, though of course the ideal starting point (the "top") for them may vary. I'm not just talking about beginners, but veterans, too.
Think about it... when you're designing a program, and are laying out how you want to organize your classes, you're looking at the overall picture
first then breaking it down into smaller, more detailed sections. You don't jump on the first object you think of and start coding its interface without giving a second thought to any other part of the program (at least I should hope you don't). You always start with the big picture, then work your way down. It's just how the mind works.
What you're proposing leads to an incomplete understanding of the infrastructure, which sometimes happens to be necessary to understand what happens on the surface, which is necessary when (not if) things go tits up. |
And when that happens, that's when the programmer goes lower and gets a firmer understanding. This may not be ideal, but it's the way it works in reality. See any number of posts on this board (including the one I linked). He was thinking abstractly, but now he needs to get into deeper details if he wants to progress.
What
you propose gives me the impression you don't feel C++ should be a first language, and that everyone should start with assembly (or machine code written by hand in a hex editor). That surely will give them a firm understanding of
everything from day 1. But of course I'm sure you agree that is completely nonsensical
Or are you suggesting that if people were taught "cin grabs characters from the standard input (whatever that happens to be at the time), parses it according to the type of parameter that was passed to operator>>() and assigns the reference. If the parameter cannot be parsed, such and such flags will be set" instead of "cin is a magic box that takes input from the user and puts it in a variable" it would produce worse code, instead of better? |
No. Knowing details is always better, and more knowledgable programmers will generally produce better code. That wasn't my point at all. I'm talking about the easiest way to learn. In the end, experience teaches all, I'm just saying that the way in which you teach yourself should be easier on you. Abstract concepts are easy. Low level details are not.
Sure, the people with a limited attention span would leave before getting to streams, but I think that's an advantage, not a drawback. |
So...intentionally making a language hard to understand is a
benefit because it scares people away? I can't possibly comprehend your motives for this statement other than elitism.
EDIT: yeah I know I said I would stop. Sometimes I just can't resist. =x