Hi!
>>>>> "Vladislav" == Vladislav Vaintroub <wlad@stripped> writes:
<cut>
Vladislav> As for me, I can get along with following conventions and with the mix of
Vladislav> them:
Vladislav> 1) Unix OS conventions (function returns int , success is 0, error is -1,
Vladislav> error details in errno)
This is for old functions. Many new functions returns error number.
Vladislav> 2) Windows OS conventions (function returns BOOL, success is TRUE, error is
Vladislav> FALSE, error details in GetLastError())
Vladislav> I cannot get along with a convention "function returns my_bool, success is
Vladislav> TRUE, error is FALSE", it looks weird to me, violating the 2)
The convention we have in MySQL now is something that has been in the
code for the last 20 years and they have been working fine.
As I said before, from experience I know that it's much easier to
expand and change a function to return more error codes if you follow
the current convention.
Large projects usually have their own conventions in coding style and
changing them 'at a whim' just because you don't understand the
background or you come from a different background is usually a bad
idea.
Regards,
Monty