3 ms·
Looks to me like having the ability to write Go syntax and interop directly with C is the plus.
by tidwall 6mo ago
Looks to me like having the ability to write Go syntax and interop directly with C is the plus.
- nagaiaida 6mo agoif you're forgoing go features to get c interop anyway, why not just roll back to whatever go version gccgo supports at that point?
- Retr0id 6mo agoI do like Go's syntax but I can't help thinking the best language for C interop is C.
- AdieuToLogic 6mo ago> I do like Go's syntax but I can't help thinking the best language for C interop is C. SWIG[0] is a viable option for incorporating C code as well. 0 - https://swig.org/Doc4.4/Go.html#Go https://swig.org/Doc4.4/Go.html#Go
- stevekemp 6mo agoI love how SWIG is still around! I first used it about 30 years ago to integrate with Perl, then later with Java.
- whateveracct 6mo agoGo's syntax is basically C tho lol what's the benefit? for loops?
- teleforce 6mo ago>having the ability to write Go syntax and interop directly with C is the plus. It's always a plus to interop with the lingua franca of programming languages. I think D language approach is more organic and intuitive that you can interop directly, and now that it's natively supported by the D compiler make it even better [1],[2]. [1] Interfacing to C: https://dlang.org/spec/interfaceToC.html https://dlang.org/spec/interfaceToC.html [2] Adding ANSI C11 C compiler to D so it can import and compile C files directly (105 comments) https://news.ycombinator.com/item?id=27102584 https://news.ycombinator.com/item?id=27102584