Open shierei opened 7 years ago
I tried this out on CAMP. CAMP compiled fine but in run time, instead of doing call by reference, it behaves as call by value.
I'll try and find some time to look at it. In the meantime I can only suggest looking at the unit tests, which are fairly extensive, and source code.
I vaguely remember something about CAMP stripping the qualifiers from argument types. Part of the problem is that it has a generic calling mechanism and possibly types get coerced/simplified so the thing you think you are referencing is not what you think it is.
It looks like if you create a member function with a reference type, it fails to compile when you declare this class member function to Ponder. For example, suppose I add a member function as follows in the Ponder example with the person class.
The declaration below would not compile.
Is this documented? Why can it be supported?
-Shie-rei