4 ms·
This is of course what Larry meant, not the literal meaning. The whole Perl 6 thing is the ultimate in this form of lazy; 15 years of design work on both the c
by raiph 11y ago
This is of course what Larry meant, not the literal meaning.
The whole Perl 6 thing is the ultimate in this form of lazy; 15 years of design work on both the culture and the technology just so he can die in peace in his old age rather than worry about having to be reborn to continue tinkering with Perl 5.
- AdieuToLogic 11y ago> ... rather than worry about having to be reborn to continue tinkering with Perl 5. So autovivification such as: my $larry; $larry->{Please}->{Add}->{Feature}++; Won't incant a commit in Perl 6? :-)
- raiph 11y agoLatest Rakudo responds with a compile-time error: ... Unsupported use of ->(), ->{} or ->[] as postfix dereferencer; in Perl 6 please use .(), .[] or .{} to deref ... Following the advice leads to: my $larry; $larry.{Please}.{Add}.{Feature}++; which leads to another compile-time error: ... Undeclared names: Add used at line 1 Feature used at line 1 Please used at line 1 ... Those "undeclared names" were probably meant to be string hash keys. So try that: my $larry; $larry.{'Please'}.{'Add'}.{'Feature'}++; Bingo. By the way, that's an unusual way to write such code. The periods are optional, so this is equivalent: $larry{'Please'}{'Add'}{'Feature'}++; And the braces, which support any expression, such as strings as used in this example, are typically not used. Instead, typical code uses angle brackets, which assume the words within are strings: $larry<Please><Add><Feature>++; Finally, in Perl 6 it's often useful to use an array sigil (@) or hash sigil (%) instead of the general purpose scalar sigil ($): my %larry; %larry<Please><Add><Feature>++; I don't know if I've incanted a commit in Perl 6 by writing this, but ya never know... :) ---- An old sig of mine (slightly reworded) from the 90s: If I could live my life again I think I'd believe in reincarnation.
- AdieuToLogic 11y ago(golf clap initiated) Well played good sir, well played indeed... :-D