|
|
|
|
|
by philjackson
5501 days ago
|
|
It should be ok (the poor PHP implementation aside). Auto-vivification is something that's very useful in Perl and I miss it greatly in the languages I program in now. Being able to do this: $one->{ two }->{ three } = [ $four ]
Without having to check every link for definedness makes for cleaner code, IMO. Making it optional "suppressing that error" would be a good middle-ground.Coffeescipt has the existential operator, not quite on a par with Perl's autovivification, which allows: zip = lottery.drawWinner?().address?.zipcode
|
|