42School / norminette

Official 42 norminette
MIT License
956 stars 140 forks source link

So-called "unnecessary header inclusion" #469

Open h-akbas opened 10 months ago

h-akbas commented 10 months ago

Students at 42 Kocaeli Campus are failed due to unnecessary header inclusion because they include header libraries (such as "unistd.h") because not all C files are using this library (in fact only one of them is using read()) so only the .c file that uses that function should include the library and it's forbidden to use elsewhere.

My question is that while we arguably benefit from slightly faster compile time, it leads to bad design practices in my humble opinion. Page 10 of Norm v4 suggests that no unused libraries can be included. The aim of the norm is to create a standard for all 42 schools and (alumni as well) but this kind of harsh evaluations at our campus seem deviant from what happens at other 42 campuses.

Page 10 of the Norm file doesn't specify openly as to what to do in such inclusion. Additionally, from what can be observed from the contributions from other campuses, no one else at other campuses conforms to this rule even if it exists.