3 ms·
(Did not read the article, judging only by its title.) Do not teach switch statements, they are old hat and are error-prone. Teach pattern matching statements
by nine_k 9y ago
(Did not read the article, judging only by its title.)
Do not teach switch statements, they are old hat and are error-prone.
Teach pattern matching statements. Actually, even kids understand them much better.
(To downvoters: yes, I mean using better, more adequate tools first, to teach the important principles. The traditional flintstone tools still in use can be taught later, from a vantage point of better understanding.)
- dang 9y agoI remember Nick Lowe in an interview saying one of the best things about getting older is you get less judgmental. He was talking about music and his example was that one day he realized: hey, Barry Manilow is actually pretty good. Those old hats are actually pretty good.
- nine_k 9y agoNot all hats get old the same way. Between Cobol (1959), Fortran (1957), and Lisp (1958), some aged better than others. C may be considered to have aged exceptionally well, despite its syntactical warts, like the declaration syntax, switch statement, lack of module system, etc. Unfortunately, some of these features were imported to other languages because of the familiarity, not because of e.g. good ergonomics or deep logic behind them. (This is to say nothing about PHP as a language.)