3 ms·
There's the unsafety inherent to C, with the risks of bugs in the underlying library, and there's unsafety caused by misusing the API. Safe languages often prov
by dbaupp 8y ago
There's the unsafety inherent to C, with the risks of bugs in the underlying library, and there's unsafety caused by misusing the API. Safe languages often provide enough power to make the latter impossible, for a C API that fits standard patterns like "new, some operations, free", or even reference counting. I think D, via classes, is one of these languages, with enough power to make the wrapper itself safe (that is, impossible to misuse the API), at least for basic stuff like construction and destruction.