Quote:
Originally Posted by BAILOPAN
The compiler, internally, has no concept of a "type" aside from hacks like methodmaps that we've surgically bolted on. It's easy to map names ("float" -> "vec_t" for example), but mapping to an entirely new type is basically impossible in the existing codebase.
|
then why not syntactically sugarcoat typedef so it achieves that desired effect?
why not do "typedef float vec_t[3];", so I can code "vec_t origin;", but inside the compiler/under the hood, it'll become "float origin[3];" ?
This would also save you guys from having to create a vector object in general for vectors.
__________________