4 ms·
I guess it's mostly about many things not having any clear meaning and depending too much on conventions. Error reporting is a celebrated example: a C function
by macleginn 7y ago
I guess it's mostly about many things not having any clear meaning and depending too much on conventions. Error reporting is a celebrated example: a C function that encountered a problem may return null or may return -1 and write null to the pointer passed to it, or return 0, if even the basic conventions are not followed, etc. All these things do not have any in-built meaning. Compare this with the Go system of returning a value and an error together. Comparing err to nil makes some intuitive sense, comparing a returned value of a function with null is, by itself, a meaningless operation.