I'm surprised at the number of lazy answer types on here "~>"? "~" is used in the context of binary NOT, or pattern matching. Neither has anything to do with conditional pointer referencing. you want to choose something, ideally, that makes sense in the language.
Going from it being a conditional expression, the idea of a question mark naturally comes to mind as in a conditional statement like "x?a:b", here, you are questioning
if the pointer is valid, if yes, do "->", implicitly, in the no case, the answer is "undef", so the ":undef part becomes superfluous. So "?->" seems clear to me.
While it is in 2nd place, it's amazing how laziness outranks logic almost 3:1 -- (more general population would probably choose lazy over logical 10:1 I'd bet...)
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|