Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

TBB syntax style

Nav
New Contributor I
473 Views
Is there a reason for the syntax style of TBB being like "allocate_additional_child_of" instead of "allocateAdditionalChildOf" ?

I personally feel that the use of underscores is old-fashioned. Although it gives good readability, it's a pain to reach out for the underscore key everytime.

So, back to the question - was there a reason for keeping the underscores?
0 Kudos
1 Solution
Alexey-Kukanov
Employee
473 Views
TBB started from PascalStyle but then therewas a deliberate decision at some early days to use underscores similarly to the C++ standard and STL. Possibly it was even based on early feedback, I don't remember now.

View solution in original post

0 Kudos
3 Replies
Dmitry_Vyukov
Valued Contributor I
473 Views
I guess cause it's official C++ naming convention. So there is at least one objective reason to use under_score, and no reasons to use Pascal or caMel.

In either case, such discussion invietably boils down to *who* is full of BS (c) Linus LOL
0 Kudos
Alexey-Kukanov
Employee
474 Views
TBB started from PascalStyle but then therewas a deliberate decision at some early days to use underscores similarly to the C++ standard and STL. Possibly it was even based on early feedback, I don't remember now.
0 Kudos
Nav
New Contributor I
473 Views
Well, I guess the decision is something that can't be reversed now. T'was nice to stick to the standard C++ style.
0 Kudos
Reply