CORBA Interfaces and GUIDs
Opened this issue · 1 comments
Hello,
This refers to "10.1. Interfaces GUIDs"
https://www.freepascal.org/docs-html/ref/refse50.html
"Corba interfaces are identified by a simple string so they are assignment compatible with strings and not with TGUID."
If I understand correctly, using GUIDs is not necessary for CORBA interfaces, any string can be used in ['...'] for interface identification (but unfortunately still must be used). So this:
IMyInterface = interface
['{79352612-668B-4E8C-910A-26975E103CAC}']
procedure Shoot;
end;
can be written in a bit nicier way:
IMyInterface = interface
['IMyInterface']
procedure Shoot;
end;
"class is interface" operator seems to work properly for this as well.
Thank you! That's nice, I didn't realize that you can put there anything (for CORBA), even just duplicate interface name, it doesn't have to adhere to GUID format. This is nicer (more obvious to readers) than trying to invent random GUIDs.
I will experiment with this and update the https://castle-engine.io/modern_pascal#_interfaces_guids .
The next question I'd like to know is "is the value provided with GUIDs still meaningful with CORBA interfaces". Is it still necessary to have unique (and non-empty) GUIDs to have working is / as / Supports with CORBA interfaces? So far, my knowledge says "yes", so this would imply that unique GUIDs are still necessary for CORBA interfaces -- but they can be anything, and indeed just duplicating interface name seems better.