Comment #0 by timothee.cour2 — 2018-03-15T00:40:20Z
usual convention is that a bool return function should return true on sucess (makes it easy with `assert(run_fun(args))`
it's what's also commonly used, eg: core.runtime.Runtime.{intialize,terminate} etc and also on parts of dmd (eg: override bool overloadInsert(Dsymbol s): Return true if successful)
however we have these oddities in dmd:
```
// src/dmd/root/response.d:207:22
* Returns:
* 0 success
* !=0 failure (argc, argv unchanged)
*/
bool response_expand(Strings* args)
```
(also suspicious (prob historical reasons) because should be false and true, not 0 and !=0)
and also these:
`Returns true if error`
(9 occurrences in dmd source code)
we should replace each such example with the correct convention, it's confusing when reading corresponding code (especially caller code). Not a problem to change these since the code is not used outside of this repo
Comment #1 by robert.schadek — 2024-12-13T18:57:52Z