this post was submitted on 29 Jul 2022
2 points (66.7% liked)
General Programming Discussion
7989 readers
6 users here now
A general programming discussion community.
Rules:
- Be civil.
- Please start discussions that spark conversation
Other communities
Systems
Functional Programming
Also related
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
How many lines of code does your system show for this?
How many lines of code does it show for this?
What about this?
And this?
These are all identical in any meaningful way. The compiler's parser will see them all as exactly the same sequence of tokens with no difference.
And now you can understand perhaps why cloc's complexity isn't entirely "unnecessary"…
Actually my program gives the exact same result as cloc for all of those.
Ah. Then cloc's output is apparently meaningless too. Pity. I thought it would at least be recognizing statement count. :-/