2 ms·
Where did Yegge claim that parentheses create rvalue lists? Other commenters here seem to think you're referring to his complaint about (1,2,3,(4,5)) equalling
by gjm11 17y ago
Where did Yegge claim that parentheses create rvalue lists?
Other commenters here seem to think you're referring to his complaint about (1,2,3,(4,5)) equalling (1,2,3,4,5), but I don't see how that complaint has anything to do with whether parens create lists. Rather, he's complaining that the comma operator is append instead of cons, kinda.
Note also that here he's talking about a bad decision made "very early on", back when Perl had no references; at that point the only way to make anything like nested lists was by giving names to all the sublists and using typeglobs or explicit calls to eval. That's a semantic point and has nothing to do with the syntactic role of parentheses in the grammar. Yes, nowadays you write [1,2,3,[4,5]] instead and make references everywhere, and that's better, but it's still not very nice because Perl references are ugly, and what Yegge's doing here is explaining how Perl came to need something so ugly.