View Single Post
nergal
Veteran Member
Join Date: Apr 2012
Old 03-24-2016 , 01:17   Re: New API and Syntax
Reply With Quote #709

Quote:
Originally Posted by BAILOPAN View Post
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.
__________________

Last edited by nergal; 03-24-2016 at 09:36.
nergal is offline