4 ms·
I agree this probably looks better in theory than it does in practice. As far as long function declarations go, it sure would be nice to go back to declaring m
by rootbear 12y ago
I agree this probably looks better in theory than it does in practice. As far as long function declarations go, it sure would be nice to go back to declaring multiple arguments of the same type without repeating the type:
int myfunc(float x, y, z, r, g, b, a);
instead of
int myfunc(float x, float y, float z, float r, float g, float b, float a);
Yes, I know about structs, but often that's not applicable. And if the type name is some long thing, then you have to really look carefully to notice they are all the same type. It seems this style is now being seen as a feature, although I don't know of any language that required repeating the type for each parameter until C and C++ adopted this for the new style function prototype declarations. I was very sorry to see that D has also adopted this "feature". I believe go allows multiple declarations of the same type. I'd much rather see this fixed in C and C++ than have them clutter up things with named parameters.
- restalis 12y ago"int myfunc(float x, y, z, r, g, b, a);" This got me thinking of the old C ways: http://msdn.microsoft.com/en-us/library/efx873ys.aspx http://msdn.microsoft.com/en-us/library/efx873ys.aspx