STB1019 / SkullOfSummer

Learn stuff with less 7-days
Apache License 2.0
5 stars 0 forks source link

Integrare i commenti su typedef di Linus #21

Closed Koldar closed 6 years ago

Koldar commented 6 years ago

Ecco le parti interessanti da integrare:

http://yarchive.net/comp/linux/typedefs.html https://www.kernel.org/doc/html/latest/process/coding-style.html#typedefs

Big things should have big names. That's why "u8" is u8, because it's not just physically small, it also has very little semantics associated with it.

I want those variable declarations to stand out, and make people understand that this is not just a variable, it's a structure, and it may be taking up a noticeable amount of space on the stack, for example.

That's the main issue for me. I don't personally care so much about trying to avoid dependencies in the header files that can also be problematic. That's probably partly because I use fast enough machines that parsing them a few extra times doesn't much bother me, and circular requirements tend to be rare enough not to bother me unduly.

So the thing is a big red warning sign that you're now using a complex data structure, and you should be aware of the semantics that go with it.