4 ms·
> The advantage of being compatible to other languages is because if we would use a common ABI that many other languages also use: Ada, Go, D, etc. I have look
by jcranmer 23d ago
> The advantage of being compatible to other languages is because if we would use a common ABI that many other languages also use: Ada, Go, D, etc.
I have looked it up and I can already tell you that Go is not using the ABI you would be proposing. I cannot speak for the other languages.
> But I fully realize that the opposition for everything that looks different to C++ from the clang side comes from the perception that it is more work on your side.
That is not where the opposition comes from, and for as long as you continue to believe that, you will fail to understand the opposition at all.
- uecker 23d agoHere seems to be the ABI, but I am not sure it is the right one and I am not sure if there are not different ABIs around. https://go.googlesource.com/go/+/refs/heads/dev.regabi/src/cmd/compile/internal-abi.md https://go.googlesource.com/go/+/refs/heads/dev.regabi/src/c... "Closure calls follow the same conventions as static function and method calls, with one addition. Each architecture specifies a closure context pointer register and calls to closures store the address of the closure object in the closure context pointer register prior to the call." In any case, the documented use of __builtin_call_with_static_chain in GCC and Clang is to be able to call closures of other languages, and for GCC Go is explicitly mentioned. GCC: https://gcc.gnu.org/onlinedocs/gcc/Constructing-Calls.html https://gcc.gnu.org/onlinedocs/gcc/Constructing-Calls.html "This built-in can be used to call Go closures from C, .." https://clang.llvm.org/docs/LanguageExtensions.html https://clang.llvm.org/docs/LanguageExtensions.html "... as used by some language to implement closures or nested functions." Yes, it is true that I completely fail to understand the opposition to this.
- deleted 22d ago[deleted]