Programming Language Peculiarities — C#
-
-
-
Baloney! His allegedly NOT compiling switch statement is the like of which I write every day, and it compiles. Enough said!
All in one Menu-Ribbon Bar DirectX for WinRT/C# since 2013! Taking over the world since 1371!
-
Baloney! His allegedly NOT compiling switch statement is the like of which I write every day, and it compiles. Enough said!
All in one Menu-Ribbon Bar DirectX for WinRT/C# since 2013! Taking over the world since 1371!
Yeah; what's he been smoking? :confused:
-
What absolute drivel.
-
"Something else to note hear..." 'Nuff said. :) /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Hello! Anybody home! It is bad enough to use switch at the first place, but since when we solve repetitive task using 'fall through'? Dear author - for that we introduced method (function/subrutine/...)
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
-
Baloney! His allegedly NOT compiling switch statement is the like of which I write every day, and it compiles. Enough said!
All in one Menu-Ribbon Bar DirectX for WinRT/C# since 2013! Taking over the world since 1371!
-
The comments on the article are rather amusing - especially his reply to Brian Friesen.
Apologies, it appears you are right. It is a while since I programmed in C# and this was an example I found while researching this article. Perhaps you have some other examples that I can use in its place.
This space for rent
-
His switch statement example is absurd. 0) Nobody would write a switch statement that falls through from the first case all the way to default. That's just f*ckin stupid. 1) He neglected to include the break statement, which would satisfy the compiler. 2) Real programmers don't use goto. 3) "each case must either have a break or a return" - wrong, retard. 4) In some instances, fall-through is viable and necessary. On declaration order of variables... 0) Regardless of whether or not a given variable is static, it MUST be declared before using it. Where did this idiot learn to write code? On I++.ToString()... 0) It's call precedence. Learn how to write code before calling something stupid. On the other hand, we can call you a retard, and be correct whenever we do it.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
His switch statement example is absurd. 0) Nobody would write a switch statement that falls through from the first case all the way to default. That's just f*ckin stupid. 1) He neglected to include the break statement, which would satisfy the compiler. 2) Real programmers don't use goto. 3) "each case must either have a break or a return" - wrong, retard. 4) In some instances, fall-through is viable and necessary. On declaration order of variables... 0) Regardless of whether or not a given variable is static, it MUST be declared before using it. Where did this idiot learn to write code? On I++.ToString()... 0) It's call precedence. Learn how to write code before calling something stupid. On the other hand, we can call you a retard, and be correct whenever we do it.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
I just noticed humanity, and came across full-on retards. :)
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
Hello! Anybody home! It is bad enough to use switch at the first place, but since when we solve repetitive task using 'fall through'? Dear author - for that we introduced method (function/subrutine/...)
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
Kornfeld Eliyahu Peter wrote:
but since when we solve repetitive task using 'fall through'?
When optimizing for example. Have you seen Duff's device - Wikipedia, the free encyclopedia[^]
Wrong is evil and must be defeated. - Jeff Ello
-
He needs to look at the main code of the company I worked at about three years ago; it was a nightmare of C# rot.
-
"Something else to note hear..." 'Nuff said. :) /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
That falls on deaf ears.
"If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
-
He needs to look at the main code of the company I worked at about three years ago; it was a nightmare of C# rot.
Hear, hear! 800 line switch statement?? Pffft, hey it compiles to key / value pair so it performs. :laugh: