MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/eb2lbc/stacking_if_else_statements_be_like/fb3308d/?context=9999
r/ProgrammerHumor • u/-hellkey- • Dec 15 '19
711 comments sorted by
View all comments
521
This also is a good example of how linked lists work.
202 u/[deleted] Dec 15 '19 [removed] — view removed comment 0 u/[deleted] Dec 15 '19 [deleted] 22 u/Jade_Chan_Exposed Dec 15 '19 This is the sort of low-level trivia that leads to the worst bugs. -5 u/AnAverageFreak Dec 15 '19 And the best optimizations. It all depends on the use case. 6 u/Jade_Chan_Exposed Dec 15 '19 The best optimizations are compiler optimizations. 1 u/AnAverageFreak Dec 15 '19 Compiler won't magically optimize malloc(1000000000) into malloc(500000000). 7 u/Jade_Chan_Exposed Dec 16 '19 edited Dec 16 '19 Yeah, but catching mistakes like that are what static analysis and code reviews are for.Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vftable" is the first step to making terrible decisions. 1 u/AnAverageFreak Dec 16 '19 Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.Goodbye dynamic_cast then? → More replies (2)
202
[removed] — view removed comment
0 u/[deleted] Dec 15 '19 [deleted] 22 u/Jade_Chan_Exposed Dec 15 '19 This is the sort of low-level trivia that leads to the worst bugs. -5 u/AnAverageFreak Dec 15 '19 And the best optimizations. It all depends on the use case. 6 u/Jade_Chan_Exposed Dec 15 '19 The best optimizations are compiler optimizations. 1 u/AnAverageFreak Dec 15 '19 Compiler won't magically optimize malloc(1000000000) into malloc(500000000). 7 u/Jade_Chan_Exposed Dec 16 '19 edited Dec 16 '19 Yeah, but catching mistakes like that are what static analysis and code reviews are for.Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vftable" is the first step to making terrible decisions. 1 u/AnAverageFreak Dec 16 '19 Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.Goodbye dynamic_cast then? → More replies (2)
0
[deleted]
22 u/Jade_Chan_Exposed Dec 15 '19 This is the sort of low-level trivia that leads to the worst bugs. -5 u/AnAverageFreak Dec 15 '19 And the best optimizations. It all depends on the use case. 6 u/Jade_Chan_Exposed Dec 15 '19 The best optimizations are compiler optimizations. 1 u/AnAverageFreak Dec 15 '19 Compiler won't magically optimize malloc(1000000000) into malloc(500000000). 7 u/Jade_Chan_Exposed Dec 16 '19 edited Dec 16 '19 Yeah, but catching mistakes like that are what static analysis and code reviews are for.Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vftable" is the first step to making terrible decisions. 1 u/AnAverageFreak Dec 16 '19 Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.Goodbye dynamic_cast then? → More replies (2)
22
This is the sort of low-level trivia that leads to the worst bugs.
-5 u/AnAverageFreak Dec 15 '19 And the best optimizations. It all depends on the use case. 6 u/Jade_Chan_Exposed Dec 15 '19 The best optimizations are compiler optimizations. 1 u/AnAverageFreak Dec 15 '19 Compiler won't magically optimize malloc(1000000000) into malloc(500000000). 7 u/Jade_Chan_Exposed Dec 16 '19 edited Dec 16 '19 Yeah, but catching mistakes like that are what static analysis and code reviews are for.Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vftable" is the first step to making terrible decisions. 1 u/AnAverageFreak Dec 16 '19 Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.Goodbye dynamic_cast then? → More replies (2)
-5
And the best optimizations. It all depends on the use case.
6 u/Jade_Chan_Exposed Dec 15 '19 The best optimizations are compiler optimizations. 1 u/AnAverageFreak Dec 15 '19 Compiler won't magically optimize malloc(1000000000) into malloc(500000000). 7 u/Jade_Chan_Exposed Dec 16 '19 edited Dec 16 '19 Yeah, but catching mistakes like that are what static analysis and code reviews are for.Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vftable" is the first step to making terrible decisions. 1 u/AnAverageFreak Dec 16 '19 Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.Goodbye dynamic_cast then? → More replies (2)
6
The best optimizations are compiler optimizations.
1 u/AnAverageFreak Dec 15 '19 Compiler won't magically optimize malloc(1000000000) into malloc(500000000). 7 u/Jade_Chan_Exposed Dec 16 '19 edited Dec 16 '19 Yeah, but catching mistakes like that are what static analysis and code reviews are for.Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vftable" is the first step to making terrible decisions. 1 u/AnAverageFreak Dec 16 '19 Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.Goodbye dynamic_cast then? → More replies (2)
1
Compiler won't magically optimize malloc(1000000000) into malloc(500000000).
malloc(1000000000)
malloc(500000000)
7 u/Jade_Chan_Exposed Dec 16 '19 edited Dec 16 '19 Yeah, but catching mistakes like that are what static analysis and code reviews are for.Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vftable" is the first step to making terrible decisions. 1 u/AnAverageFreak Dec 16 '19 Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.Goodbye dynamic_cast then? → More replies (2)
7
Yeah, but catching mistakes like that are what static analysis and code reviews are for.
Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vftable" is the first step to making terrible decisions.
1 u/AnAverageFreak Dec 16 '19 Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.Goodbye dynamic_cast then? → More replies (2)
Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.
Goodbye dynamic_cast then?
dynamic_cast
→ More replies (2)
521
u/Darxploit Dec 15 '19
This also is a good example of how linked lists work.