[SERVER-81959] IDL: unambiguously distinguish between member and nonmember function names with leading dot Created: 06/Oct/23  Updated: 07/Oct/23

Status: Needs Scheduling
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Billy Donahue Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-81489 Allow IDL generator serialize custom ... Closed
Assigned Teams:
Service Arch
Participants:

 Description   

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.


Generated at Thu Feb 08 06:47:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.