3 ms·
You're being pedantic about reserved words?
by metaobject 9y ago
You're being pedantic about reserved words?
- spc476 9y agoI had that same problem. I wrote a C library [1] that has a structure field named "class". It's "class" because the protocol being described (DNS) calls that particular field "class" [2]. And I'm not about to pay lip service to an abomination like C++ [3][4]. [1] https://github.com/spc476/SPCDNS https://github.com/spc476/SPCDNS [2] https://github.com/spc476/SPCDNS/blob/ca5052c3d0c3252071a18ebbada808a7b536c860/src/dns.h#L255 https://github.com/spc476/SPCDNS/blob/ca5052c3d0c3252071a18e... [3] I am NOT a fan of C++. [4] But I had to anyway, but I used the C pre-processor to rename the field.
- camgunz 9y agoYeah I super hate this. There's no other language that requires other languages to contort themselves like C++ does. Every time I see `#ifdef __cplusplus` or `klass` my blood pressure spikes.