> Implied semantics matter a LOT in API design. +1 > > > > Check your errors :-) > I don't need to check errors, I just need to check whether 'rows' is > a > table or a nil value in the case of an error. I could've checked if > 'err' was anything, but the result is the same. > > An API which returns (foo, err) should be error checked on the error, > not the foo. This style of API will sometimes return a foo in a bad > state, and an err to let you know. In your example this is fine, I > am just being a pedant because if an API is designed a certain way, > we should use it that way :-) >
My take away is that we want mod_dbd bindings in mod_lua, but we want the API to be more carefully crafted. i -- Igor Galić Tel: +43 (0) 664 886 22 883 Mail: [email protected] URL: http://brainsware.org/ GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE
