You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It might be valuable to check out this scientific article published January 2020:
Lin Chen, Di Wu, Wanwangying Ma, Yuming Zhou, Baowen Xu, and Hareton Leung. 2020. How C++ Templates Are Used for Generic Programming: An Empirical Study on 50 Open Source Systems. ACM Trans. Softw. Eng. Methodol. 29, 1, Article 3 (January 2020), 49 pages. DOI:https://doi.org/10.1145/3356579
Among other observations the authors have found:
"(1) templates are practically used to prevent code duplication, but this benefit is largely confined to a few highly used templates"
" (4) the use of templates follows a power-law distribution in most cases, and C++ developers who prefer using templates are those without other language background;"
If in practice the benefits of templates are confined to only a few cases (which are mostly libraries) and most of the time C++ templates are used by developers who have no practical background with other languages ... that would mean that C++ templates should qualify to be code smells and marked by code checker as a potential source of error (that can be turned off for the rare library cases where it is used correctly).
Describe the solution you would like
Code Checker should have a checker for C++ templates that by default marks template occurrences in C++ as code smells, that should be corrected (and it should be possible to turn off this checker for certain libraries)
Describe alternatives you have considered
Well ... this is published, peer-reviewed, scientific paper ... so maybe another paper, with even more projects analyzed could be an alternative.
But, that might also just make the number more precise, not change the general findings of the cited paper.
This discussion was converted from issue #3109 on February 22, 2021 14:46.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is your feature request related to a problem? Please describe.
It might be valuable to check out this scientific article published January 2020:
Lin Chen, Di Wu, Wanwangying Ma, Yuming Zhou, Baowen Xu, and Hareton Leung. 2020. How C++ Templates Are Used for Generic Programming: An Empirical Study on 50 Open Source Systems. ACM Trans. Softw. Eng. Methodol. 29, 1, Article 3 (January 2020), 49 pages. DOI:https://doi.org/10.1145/3356579
Among other observations the authors have found:
"(1) templates are practically used to prevent code duplication, but this benefit is largely confined to a few highly used templates"
" (4) the use of templates follows a power-law distribution in most cases, and C++ developers who prefer using templates are those without other language background;"
If in practice the benefits of templates are confined to only a few cases (which are mostly libraries) and most of the time C++ templates are used by developers who have no practical background with other languages ... that would mean that C++ templates should qualify to be code smells and marked by code checker as a potential source of error (that can be turned off for the rare library cases where it is used correctly).
Describe the solution you would like
Code Checker should have a checker for C++ templates that by default marks template occurrences in C++ as code smells, that should be corrected (and it should be possible to turn off this checker for certain libraries)
Describe alternatives you have considered
Well ... this is published, peer-reviewed, scientific paper ... so maybe another paper, with even more projects analyzed could be an alternative.
But, that might also just make the number more precise, not change the general findings of the cited paper.
Beta Was this translation helpful? Give feedback.
All reactions