Idiomatic C API
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Idiomatic C API
- From: "Soni \"They/Them\" L." <fakedme@...>
- Date: 2018年2月25日 00:33:57 -0300
Lua's C API is not idiomatic. I don't see setjmp/longjmp used by things
like POSIX (as far as I know nothing in POSIX says you have to use
setjmp/longjmp to handle errors) or libuv.
It would be more idiomatic to return error codes, and have the caller
propagate errors. (Using setjmp/longjmp internally is fine tho.)
This would also increase compatibility with some libraries and
programming languages.
--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.