Re:Symbian Won
by brianpursley on Thursday June 25, 2020 @12:44PM
(#23642631)
> I could never accept the coding standard for curly bracket positioning.
OK, so I had to look.
It's like they saw the two main camps (same line vs next line) and said "let's come up with something everyone will hate":
TInt GetROMSize(TInt /*aDeviceNumber*/, TInt /*aAttrib*/, TBool /*aSet*/, TAny* aInOut)
{
TMemoryInfoV1 info;
TPckg<TMemoryInfoV1> infoPckg(info);
TInt r=UserSvr::HalFunction(EHalGroupKernel, EKernelHalMemoryInfo, (TAny*)&infoPckg, NULL);
if (r==KErrNone)
{
*(TInt*)aInOut=info.iTotalRomInBytes;
}
return r;
}I can understand the desire to have the brackets at the same indent... but WOW does this break my brain having the inner code not indented from the bracket level. (I tend to prefer the opening backet being on the same line as the condition gate/guard and rely on the parser to inform me of missing brackets. This is even better in languages that have a single format convention.)
Re:Symbian Won
by perennialmind on Thursday June 25, 2020 @01:32PM
(#23643175)
Wow. I had a CS professor insist on exactly that style. I couldn't stand it at first, but making accommodations was the whole point. Unfortunately it got me thinking about what I would want. Now I'm the weirdo and I rarely get to write it the way I want. <shrug>
Re:Symbian Won
by AceJohnny2 on Thursday June 25, 2020 @12:47PM
(#23642657)
> I could never accept the coding standard for curly bracket positioning.
Hahaha, how bad could it be...
... Why the fuck would they need to indent every function by an 8-space tab!?
Re:Symbian Won
by AceJohnny2 on Thursday June 25, 2020 @12:57PM
(#23642760)
I worked at STMicro for a while, and a neighboring team worked on Symbian support. I remember they had this weird coding standard that was essentially "why the fuck not?".
Now, over a decade later, I understand that they looked at the Symbian standard, and saw that anything goes.
8-space using the tab character is the Linux kernel standard, but the curly braces are closer to other coding standards.
Re:Symbian Won
by AceJohnny2 on Thursday June 25, 2020 @04:42PM
(#23645455)
It's not the 8-space I'm aghast about, but that every function body is indented by it.
Re:Symbian Won
by SemiNormal on Thursday June 25, 2020 @01:00PM
(#23642798)
Whitesmiths style is for sadists.
There are few more places where you could grab Symbian sources.[0]
I could never accept the coding standard for curly bracket positioning.