Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What language other than C would allow code to be used from all mainstream languages/frameworks? This is a critical requirement for a lib like openssl, having N such libs for N languages would be a nightmare.


Something that compiles to C? Or can compile to C at a slight performance penalty for unsupported platforms?


Write it in safe, modern C++, with an extern C API.

I'm sure that leaves out a few rare cases on embedded platforms where they only have a C compiler, but they could continue using existing libraries.


I can't see why C++ would be any safer than C. For example Heartbleed like bugs in C++ are still very much possible.


It's possible to define a subset of C++ that can be statically verified to not have this sort of problem. This can also be done with C, but it's more difficult. There are actually people who write in overrun-proof subsets of C++.


Wow, I wish posts like yours weren't so rare. There is way too much undeserved hate heaped on C++ due to (imo) C programmers that pretend to code C++.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: