3 ms·
I think James Bennett's post on magic is interesting: http://www.b-list.org/weblog/2009/jul/23/magic/ http://www.b-list.org/weblog/2009/jul/23/magic/ In partic
by xiongchiamiov 16y ago
I think James Bennett's post on magic is interesting: http://www.b-list.org/weblog/2009/jul/23/magic/ http://www.b-list.org/weblog/2009/jul/23/magic/
In particular, there is a comment[0] that I think is particularly worth reading:
There are two different definitions of magic in play here.
1. The use of advanced language features in a manner that might be confusing to a novice programmer.
2. The use of ANY language feature to automate some process that a programmer would not expect to be automated.
I am of the belief that the second is the proper definition, which is something that is not usually solved by reading sourcecode, as the question is "Why?", rather than "What?" or "How?".
[0]: http://www.b-list.org/weblog/2009/jul/23/magic/#c118751 http://www.b-list.org/weblog/2009/jul/23/magic/#c118751
- Periodic 16y agoIt's like the reason I advocate comments though I know a few people who believe the code's behavior should be self-evident. The real question for any interesting application is not the how or the what, but the why. You can't answer the why just by reading the code. You need to understand the problem and the trade-offs, and for that you need comments and documentation.