in reply to On human memory management
That's the key: everything fits together with features' subtle points designed to lead to elegent combinations with other features, or the result of strict application of general principles.
I could know how some feature should work without reading the details, because I knew the general philosophy and concepts. When I did read it, that just re-enforced things, and I noticed anything that wasn't expected and remembered just that.
The example of a negative limit for split doesn't work this way. Through application of principles, you get either (1) a negative number is just another number, and a single simple statement of what that number does should handle all cases. Well, that's wrong since 0 is a special case and negative is a different special case. Or (2) it would count from the right instead of from the left, returning the last n values if you specified -n. Well, it doesn't do that either.
If you didn't look it up, you have no reason to suppose negative split limit does what it does, or even exists. It's an arbitrary factoid to remember.
The very nature of Perl to be like natural language--inconsistant and full of dwim and special cases--makes it impossible to know it all without simply memorizing the documentation (which is not complete or totally correct anyway).
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Time to re-read the Camel Book (?)
by bronto (Priest) on Jan 29, 2003 at 09:42 UTC | |
by hsmyers (Canon) on Jan 29, 2003 at 19:16 UTC |