3 ms·
It was nice of Yegge to quote the entire section of the perl man pages on how the .. operator works. Notice it is fully documented, all the different contexts
by thwarted 17y ago
It was nice of Yegge to quote the entire section of the perl man pages on how the .. operator works. Notice it is fully documented, all the different contexts it works in, what it returns, how it returns it, the different types it works on. One might consider perl to be OVERLY documented, and navigating the man pages works pretty well when searching from inside less(1). I wish python and ruby and PHP had their entire documentation, or even just a significant standard library function list, available as man pages on every system they are installed on (although, why Ubuntu's doesn't package up perl man pages as part of perl by default, I don't know).
Then look up the Ruby documentation for .. , which is also overloaded to have two different meanings, one that works inside conditionals and one that constructs Range objects when outside of Range objects, which is just as much syntactic sugar as anything perl provides. And the difference between .. and ... is visually subtle, I wonder how many off-by-one errors that operator idiom causes.