Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-81959

IDL: unambiguously distinguish between member and nonmember function names with leading dot

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Work on SERVER-81489 has brought to light a syntactic problem in the way IDL specifies the names of C++ functions that it imports and uses.

      It tries to determine whether a specification is referring to a member function or nonmember function.
      This is not generally possible to do. An identifier can mean either thing, even if it has :: scope operators embedded, as these could still be referring to a base class member function, like:
      "myns::func" could refer to an intent to specify a member function in the base class myns, invoked as: item.myns::func(). So what it does is consider something to be a nonmember function only if it has a LEADING scope operator, but this would anchor the function in global scope. It's unclear syntax.

      I think we should look into the idea of extending IDL syntax so that a leading . dot will indicate member function unambiguously.
      EVERYTHING else would be a nonmember function. I think we can probably sweep the codebase and make this change in a reasonable timeframe.

            Assignee:
            Unassigned Unassigned
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: