3 ms·
So I agree with pretty much everything you said, but it surprised me that people would consider "map" and "closure" a) at all difficult to learn and b) an all-
by duaneb 11y ago
So I agree with pretty much everything you said, but it surprised me that people would consider "map" and "closure" a) at all difficult to learn and b) an all-or-nothing business. Could you elaborate? I've found them to be complementary to traditional iteration, object, and macro oriented patterns—they have their strength and weaknesses, and the idea of seeing them either nowhere or everywhere is weird.
- btilly 11y agoYou underestimate the bias caused by our initial language. If you're an imperative programmer who has seen some OO, you can learn what map and closures are, but still have no idea what design patterns fit with them. And will be taken aback the first time you encounter them. The first time I encountered a program that used them in an interesting way, I spent 20 minutes of utter confusion trying to figure out where anything HAPPENED. When I finally found the magic line, I went to the person who wrote it and said, "Why didn't you at least leave a comment!??" He looked at me, slightly puzzled, and said, "What comment would have helped?" Today these are much more widely understood than they used to be. Mostly because JavaScript forced people to learn it. Though at one point I did have a role in popularizing the concepts in the Perl community with http://www.perlmonks.org/?node_id=34786 http://www.perlmonks.org/?node_id=34786.