4 ms·
They require that pointers be declared as int32* p; and not int32 *p; and I know that is the convention in C++, but it still makes my eyes bleed. I
by rootbear 12y ago
They require that pointers be declared as
int32* p;
and not
int32 *p;
and I know that is the convention in C++, but it still makes my eyes bleed. It's a gross violation of the Law of Least Astonishment, since, of course,
int32* p,q;
doesn't do what you might think it would, based on the syntax. This is not a problem for the F-35 code, since multiple declarators per declaration are forbidden.
Sorry, I'm an old C guy and I guess there are some new tricks I just can't learn...
- deleted 12y ago[deleted]
- exelius 12y agoIt seems that this standard definitely goes for clarity of code over syntactic shortcuts. Which, you know, is probably a good idea for critical system software on an aircraft. It's better for your intermediate developers to know exactly what your code is going to do than to be able to use some greybeard tricks that can lead to buffer overflows if the person modifying them doesn't know exactly how they work.