|
|
|
|
|
by jasode
3368 days ago
|
|
Look at the common theme among your suggestions: - do not use builtin operators in C for that,
- instead create new functions, e.g. addMeters()
- hide the int in *.c file
Those are "best practices" instead of compiler-enforced type-check errors. Likewise, suggesting a best practice such as "don't free() memory twice" is not the same as a GC-language (Lisp/Java/C#/Go) freeing memory on the programmer's behalf or a static-ownership checker (Rust) preventing a programmer from making that mistake. |
|
"Best practice" is a choice from among justifiable alternatives.