http://www.perlmonks.org?node_id=975224


in reply to Re^2: What operator should perl5porters use for safe dereferencing?
in thread What operator should perl5porters use for safe dereferencing?

I've been using Perl for a while and with Perl's 'do what you want' it would seem that there shouldn't be a new operator. Returning undef seems fine with a warning
  • Comment on Re^3: What operator should perl5porters use for safe dereferencing?

Replies are listed 'Best First'.
Re^4: What operator should perl5porters use for safe dereferencing?
by pemungkah (Priest) on Jun 08, 2012 at 21:33 UTC
    I think it's mostly getting used to the different semantics. I love how much more compact the code is in Objective-C when I don't have to worry about sending messages to undef. But I can equally understand the desire to have that throw an exception. The "I'll add a new operator to provide this" seems like a harder way to have both options - but it does specifically call out "In this case, I am explicitly deciding to do safe deref", so...

    I'l try to get something working so it can at least be tried.