Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
fspeech
on Aug 29, 2016
|
parent
|
context
|
favorite
| on:
Zig: a system language which prioritizes optimalit...
The first thing I would want to use something like this for is to write C API for a C++ library. Is that possible with the current state of Zig?
AndyKelley
on Aug 29, 2016
[–]
I think the best language to do that in is C++. You write a C .h file, and then a C++ .cpp file that implements the C functions using the C++ API.
Zig doesn't know how to use the C++ ABI. It's pretty complicated.
fspeech
on Aug 29, 2016
|
parent
[–]
You are right that C++ methods need to be invoked in C++ code. However C container types are too weak/inconvenient to wrap C++ code. I am wondering if something like Zig can be used to create STL like containers that can be used at the API level?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: