3 ms·
I think this is borrowing a convention from Perl, where the variable $_ is often given an implicit value of "the thing I'm talking about" when you didn't bother
by nfoz 6y ago
I think this is borrowing a convention from Perl, where the variable $_ is often given an implicit value of "the thing I'm talking about" when you didn't bother to give a real variable name for it.
http://www.tutorialspoint.com/perl/perl_special_variables.htm http://www.tutorialspoint.com/perl/perl_special_variables.ht...
(The $ sigil denotes that the variable is a scalar; all Perl variables have a sigil like that.)
So this reads naturally to me: _ is the lg_buf, it doesn't need a real name like "buf", because it's just "the thing" or "it".
- rurban 6y agoAnd Perl took this convention from Prolog. In Perl it's the default context, in Prolog the default unknown symbol.