|
|
|
|
|
by karmakaze
941 days ago
|
|
If we taught functional programming first, there's a log we can do without. We don't need variables that vary--only reference names that are assigned once within a scope. We can also eliminate loops and associated off-by-1 mistakes using map, reduce, etc. This of course puts different 'hard' things up front like applying a function over a collection of data, but that's one that scales well, IMO. But we also hit recursion sooner, that could be a difficult hurdle as it requires a big 'trust me this works' until a better understanding is gained. Again this scales better as it teaches making a smaller instance of the problem to solve at each level/layer that's universal in decomposing problem into similar and/or dissimilar parts. |
|
I think this depends on the audience. If you want to teach programming to people with less talent/passion for math, I believe you can have more success with procedural/imperative programming, which IMHO requires less abstract thinking than functional programming.