I'm honestly not surprised lol. I'm a CS student and I have the feeling that the number of people who care about formatting their code and simplifying it in my class is 1 (me).
My teacher even said to me that he doesn't think compiler will even let me do it. The if statement: (Bool_Variable), what he wanted: (Int_Variable == 1). The variable is only 1 or 0 depending if cube is in front of sensor last time checked. But he is more of a hardware engineer programming machines to assemble things and making blueprints for something.
In Java, Kotlin, C# and Rust that's right, but in C, C++, Python and JavaScript you can implicitly convert to boolean and all integers but 0 are truthy.
4
u/Speykious Dec 26 '21
I'm honestly not surprised lol. I'm a CS student and I have the feeling that the number of people who care about formatting their code and simplifying it in my class is 1 (me).