Damdoshi/LibLapin

Reference/Pointers on something? Reference/Pointers on pointers?

Opened this issue · 1 comments

Currently, pointers are half implemented throught the SmallConf::RAWSTRING type.
And it is a type in itself. It is not a "reference to stuff" or "reference to reference to stuff".

It may not be a big deal to not have pointers on pointers: pointers are not used to create array, because arrays are builtin into nodes. But it should be at least be able to be qualified to a final something.
Pointers on int, double, string... Evne more: pointers on node and pointers on array.

The most common use case I have in tadventure is to give a reference on a node that contains a bunch of stuff. It works, currently, because there is no such thing as type qualification. But I ask that question: when, finally, type are gonna be able to get declared, instead of simply having instances builts inside the dabsic tree, would it not be nice to be able to qualify references? To say "Ref to this kind of".

Of course, "void refernece" on random node would still be achievable, but for it would increase code strength.

And after that, how to consider types are compatibles would be a nice question to answer.

Current use case seems to be in favor of distinguish pointers from node sent by copy.
function parameters may be forged by C/C++ (this is the case in tadventure) and in this case, the bunny configuration packet used to send parameters is not in the dabsic tree. it is a standalone thing.

So it is impossible to send only the address of it, because "pointers" and "address" in Dabsic are not addresses in memory but addresses in Dabsic - they're editable like symbolic link in file system.