Overloading
Overloading
Posted Apr 28, 2014 22:33 UTC (Mon) by HelloWorld (guest, #56129)In reply to: Overloading by drag
Parent article: Porting the Go compiler to Go
Posted Apr 28, 2014 23:22 UTC (Mon)
by alankila (guest, #47141)
[Link]
$ perl -we 'sub x { my $x = shift; sub y { $x } }'
Perl's major fault is that too few of its warnings are fatal errors. I know, I know, you can opt-in to have warnings go fatal. My point is that the defaults are wrong.
Posted Apr 28, 2014 23:45 UTC (Mon)
by rgmoore (✭ supporter ✭, #75)
[Link] (1 responses)
It's not that unreasonable. Perl makes a fairly big deal about anonymous values, and only anonymous functions can be turned into closures. If you like writing with closures, you'll learn the rules for them pretty quickly. This is the blessing and the curse of big languages like Perl. There's lots of cool features there to learn and use, but it means that different people program in different dialects that aren't as mutually comprehensible as you'd like. My take on this is that Larry Wall said he wanted Perl to be more like a human language than like a computer language, but that his idea of what human language is like is heavily influenced by being a native English speaker.
And I believe the properly snarky response to "If it hurts when you do that, don't do that." is "That's why I avoid Perl."
Posted Apr 29, 2014 0:03 UTC (Tue)
by HelloWorld (guest, #56129)
[Link]
Posted Apr 29, 2014 6:21 UTC (Tue)
by niner (subscriber, #26151)
[Link]
Overloading
Variable "$x" will not stay shared at -e line 1.
Overloading
Overloading
It is, it's completely nonsensical. I don't care about the excuses Larry might come up with.
Overloading
