4 ms·
I teach programming, and I find people rarely have any special trouble in switching to a different style or paradigm. If I was teaching in the 80's and wanted t
by a_lieb 8y ago
I teach programming, and I find people rarely have any special trouble in switching to a different style or paradigm. If I was teaching in the 80's and wanted to transition someone from old school BASIC to something like C or Pascal with structured programming and blocks, I'd show them an "if" with a code block and how it's different than a conditional GOTO, yet similar in a way. Gradually the mental model evolves to incorporate the new features, and when they look back, they can understand both ways, even though on paper it's "two different paradigms."
Similarly, if I'm teaching JavaScript and want to show the student functional programming, I'll show them how a "for" loop could be converted to use map or filter, or recursion. Far from "corrupting their mind" so they can't understand other ways, the imperative style serves as a foundation to learn other styles. The paradigm shift occurs gradually on some subconscious level, with the previous paradigm serving as a mental model to build up the new one.