What is the point of these useless typedefs?
36 minutes ago, Gat Pelsinger said:Oh wait, I get it. It's for making your code look more cool and technical, isn't it? Yeah, I have this fetish to.
Those are more often than not abstractions related to other things, like different CPU architectures (a int and long change on size depending on which architecture you are on), or higher level stuff (DWORD and QWORD are common naming through the computing world, and iirc those names are also used in Window's registry editor).
Undersocres are often used to indicate private functions/variables. Since C doesn't have the proper concept of private functions, this is a workaround that's used, which helps to avoid naming collisions.
If you're planning on supporting windows in the long term and across different versions, using their abstractions is likely the best way, otherwise you'll be doing your own IFDEFs for each version in case any of the underlying types change.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now