3 ms·
Though I absolutely dislike the excessive use of typedefs (e.g. Windows with its use of DWORD_PTR instead of unsigned long * or uint32_t * ), I think it's appro
by nitrogen 15y ago
Though I absolutely dislike the excessive use of typedefs (e.g. Windows with its use of DWORD_PTR instead of unsigned long * or uint32_t * ), I think it's appropriate to use a typedef or two to simplify declarations of function pointers which themselves accept or return function pointers.
- gaius 15y agoOracle OCI does this, but it's clear why: Oracle has supported some 90 platforms over its long history, many of which no longer exist, or are no longer supported, and it's not inconcievable that more will be supported in future. So instead of char* you say OraText* (for example, there are loads of these) and for that you get Oracle's guarantee that your code will compile everywhere Oracle runs.
- nitrogen 15y agoIt does makes sense for multi-platform software that predates C99's precisely-sized integer types. I first got my taste of them through a rough predecessor, the u32/i32/etc. types in the Linux kernel. I see them as a much more transparent approach to portability for system-level software, but concede that higher-level software may wish to preserve more meaning in some its type names (as in your example of OraText vs char). This still doesn't excuse DWORD_PTR, IMO :).