<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body smarttemplateinserted="true">
    <div id="smartTemplate4-template">
      <blockquote type="cite"
        cite="mid:91387658-5415-4970-87A3-BA3BDCD7ACD0@thealchemistguild.com">
        <blockquote type="cite" style="color: #000000;">
          <pre class="moz-quote-pre" wrap="">Perhaps there could be the opposite modifier, so the function cannot be called with nil. Like
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">Interesting idea but I’d have to think about it more to know if this is a real problem I’ve ever experienced.
</pre>
      </blockquote>
    </div>
    <div><br>
    </div>
    <p>for example, I store some interfaces in a list, and just replaced
      the default list with a faster list that assumes all interfaces in
      the list are non-nil. (When you know the interface is non-nil, you
      can replace the automatic reference counting with a direct call to
      ._addref, which is faster. )<br>
    </p>
    <p>But then it crashed because somewhere it was used with a nil
      interface. There it would have been useful to mark the new
      function as only non-nil accepting, so that it is clear it cannot
      be used like the old function, and the compiler have made sure
      there is no call with nil<br>
    </p>
    <p><br>
    </p>
    <p>
      <blockquote type="cite"><br>
        Well, as far as the "optional" part goes, the benefits of it
        will be fairly limited. Object variables occur in many places,
        and all of them can have the nil value, and the compiler has no
        idea if you did the check.
        <br>
        <br>
        You pick a tiny subset of those cases, and attempt to add
        protection to it. Given the gain (or rather absence of it,
        according to the microscopic size of that subset) the effort
        (and chance of false positives) is not worth it.
      </blockquote>
      <br>
    </p>
    <p>You would need to have optional or non-nil markers at every
      variable, before it becomes really useful.</p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p>Benito<br>
    </p>
  </body>
</html>