Revenge of Redmond – C# and the .Net Frameworks
-
I still don't get why any modern language needs
goto
at all.goto
is a first generation language command. It was already bad for procedural programming, worse for OO, and catastrophic for anything involving multithreading. Not to mention functional programming.Because sometimes - very, very rarely - it is the best thing to do. It can save a mess of "get me out of here" bools, and a lot of otherwise unnecessary testing. Having said that, I haven't needed to use it in at least ten years - and I wish teachers were less lazy and didn't start with it on day one to make their lives easier...
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
-
Because sometimes - very, very rarely - it is the best thing to do. It can save a mess of "get me out of here" bools, and a lot of otherwise unnecessary testing. Having said that, I haven't needed to use it in at least ten years - and I wish teachers were less lazy and didn't start with it on day one to make their lives easier...
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
I've heard that argument over and over again. While I can perfectly understand that notion when I look at certain pieces of code, the fact that the code is so convoluted that
goto
is considered the best way to get out of it, is a very strong indication that you should refactor that code, not usegoto
.goto
is a short circuit. That's the kind of thing a good programmer strives to avoid. Using it intentionally is reserved for dubious causes such as stealing a car. ;) P.S.: saying it may be 'the best thing to do' implies that there are other options. In my experience, programmers telling me 'that it's the best' judge it to be the best for all the wrong reasons. But anyway, it's at least partially subjective. In 26 years of C++ programming I've yet to see a piece of code that convinces me of using goto, but that's just me. Others may have different preferences. -
I've heard that argument over and over again. While I can perfectly understand that notion when I look at certain pieces of code, the fact that the code is so convoluted that
goto
is considered the best way to get out of it, is a very strong indication that you should refactor that code, not usegoto
.goto
is a short circuit. That's the kind of thing a good programmer strives to avoid. Using it intentionally is reserved for dubious causes such as stealing a car. ;) P.S.: saying it may be 'the best thing to do' implies that there are other options. In my experience, programmers telling me 'that it's the best' judge it to be the best for all the wrong reasons. But anyway, it's at least partially subjective. In 26 years of C++ programming I've yet to see a piece of code that convinces me of using goto, but that's just me. Others may have different preferences.I agree. But the fact is there is code that you can't refactor for one reason or another: time is the most common. Or efficiency in a time critical segment. It's there. But don't use it until you are experienced enough to understand why it is a bad idea to do so...
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
-
I agree. But the fact is there is code that you can't refactor for one reason or another: time is the most common. Or efficiency in a time critical segment. It's there. But don't use it until you are experienced enough to understand why it is a bad idea to do so...
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
:sigh: Yes, indeed. You don't always get the time required to get your code clean. I can in fact understand that in such circumstances you may feel forced to stick with goto. That however doesn't justify to make it available as part of a new language. Regarding efficiency I disagree though: you can always store the condition that you would use to trigger a goto in a boolean variale and then just skip over the remaining blocks of code. That takes virtually no time at all. That's what I usually do.
-
:sigh: Yes, indeed. You don't always get the time required to get your code clean. I can in fact understand that in such circumstances you may feel forced to stick with goto. That however doesn't justify to make it available as part of a new language. Regarding efficiency I disagree though: you can always store the condition that you would use to trigger a goto in a boolean variale and then just skip over the remaining blocks of code. That takes virtually no time at all. That's what I usually do.
Sometimes, "virtually no time at all" is still too much! :laugh: You can tell I grew up in an Embedded environment, can't you? :-D
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
-
Sometimes, "virtually no time at all" is still too much! :laugh: You can tell I grew up in an Embedded environment, can't you? :-D
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
Been there, done that. ;)
-
Over the many years that I have been programmer, I have detected a growing arrogance on the part of Microsoft employees. I find this strange because Microsoft depends so much upon its customer base. Yet, whenever some flaw is found in its software, Redmond is quick to argue that the bug is really a feature. This has occurred to me, personally, since Visual Studio 4. This arrogance spiked with the release of the C# programming language and its associated multiple .Net frameworks. Having been a member of the X3J9 Pascal technical committee (circa 1978), I am aware of what makes a “good” programming language. We teach these attributes to serious students of language design. Unfortunately, Redmond either didn’t take the classes or neglected their import. As a result, we have C# in its fourth generation (surprisingly not called "C#-4GL"). Generics, LINQ, and so forth have been added. Unfortunately, they were not part of the original C# language. They are "corrections" to missteps taken by Redmond in its attempt to be all things to all people. And they make my programming job much more difficult. I truly would like to see a new, simple, stripped-down version of C#. What I liked the most with the original C# language were the ArrayList and garbage collection. I believe that all the rest is unnecessary object oriented revenge. Peace.
Gus Gustafson
Agree completely. MS just makes money, they don't care how ugly their design is - worse design they make, more money they get on "bug fixes" (named "service packs"). This is why there is a big reason to leave M$ with their hindu gang of diletants and gays and move to the D language - also with GC, lot of collection classes, but w/o those slow monster ".NET".
-
Generics are awesome and were a fairly bad omission from the original release, imo. The C# implementation is very good and they make it much easier to write type safe, efficient, clean code. LINQ, lambdas etc are just syntactic sugar and as long as you can read them, you don't have to bother learning how to write them, but they can increase elegance markedly when used appropriately. I don't agree with you at all, really, I think that the evolution of C# has been positive and made it an easier language to use.
Problem is if you start building a home on a sh*t mountain, soon or later your building goes down under features. Same with C#: either you add _valuable_ feature and have to rebuild a whole .NET to support it, or you make trivial syntactic sugar just to keep bad designed .NET on the surface. What you named "positive" doesn't mean "valuably positive". Moreover - a lot of stuff in .NET is written based on ugly .NET 1.1 classes. Having modern C# it's ridiculous to see old rubbish we have to use. At least generics are absolutely unavoidable in any proper language (like D) - it's "base" for so many algorithms, that missing this feature like reinventing BASIC language! Same rubbish, but with C-syntax.
-
Over the many years that I have been programmer, I have detected a growing arrogance on the part of Microsoft employees. I find this strange because Microsoft depends so much upon its customer base. Yet, whenever some flaw is found in its software, Redmond is quick to argue that the bug is really a feature. This has occurred to me, personally, since Visual Studio 4. This arrogance spiked with the release of the C# programming language and its associated multiple .Net frameworks. Having been a member of the X3J9 Pascal technical committee (circa 1978), I am aware of what makes a “good” programming language. We teach these attributes to serious students of language design. Unfortunately, Redmond either didn’t take the classes or neglected their import. As a result, we have C# in its fourth generation (surprisingly not called "C#-4GL"). Generics, LINQ, and so forth have been added. Unfortunately, they were not part of the original C# language. They are "corrections" to missteps taken by Redmond in its attempt to be all things to all people. And they make my programming job much more difficult. I truly would like to see a new, simple, stripped-down version of C#. What I liked the most with the original C# language were the ArrayList and garbage collection. I believe that all the rest is unnecessary object oriented revenge. Peace.
Gus Gustafson
I've heard a great deal of praise heaped on C#, but in my encounters with it to this point, I've always come away bruised. In part, that's because it's still changing (and VS .NET with it). In part, it's because I'm a dinosaur who expects the facilities I've come to know and love to remain available and convenient when I "upgrade." But more significant than those reasons or any others is this one: I dislike being "protected from myself."
I like pointers.
I prefer permissive type conversions.
I'm a high expert at picking floating-point numbers apart from their binary representations. (Ever seen old-style IBM floating-point? What about CDC's 60-bit version?)
If I can't substitute an address for an integer or vice-versa, I'll throw a fit.
And don't you dare move something I've put in allocated memory! I'll do my own "garbage collection," thanks very much.My first language was assembler on a PDP-9. I moved from there to the Data General NOVA 1200, still programming in assembler, and from there to the PDP-11, and then to the Intel 8080, 8085, and Zilog Z80, still programming in assembler. Over those years, various persons attempted to convert me to the glories of FORTRAN, Pascal, Algol, APL, PL/I, LISP, and Forth. I spurned them all: not one of them permitted me to do everything I felt I might need to do in some hypothetical situation. When I was introduced to C, for the first time I felt I could "go machine-independent" without losing the full freedom of the machine.
Today I program in C++ and microcode for special-purpose devices. I'm uninterested in C#, Ada, or any other language that attempts to restrict what operations I can attempt. I find it puzzling that other software engineers are willing to accept such shackles. But hey, I told you already: I'm a dinosaur.
I wonder if you'll miss my sort when we're completely extinct...
(This message is programming you in ways you cannot detect. Be afraid.)
-
Over the many years that I have been programmer, I have detected a growing arrogance on the part of Microsoft employees. I find this strange because Microsoft depends so much upon its customer base. Yet, whenever some flaw is found in its software, Redmond is quick to argue that the bug is really a feature. This has occurred to me, personally, since Visual Studio 4. This arrogance spiked with the release of the C# programming language and its associated multiple .Net frameworks. Having been a member of the X3J9 Pascal technical committee (circa 1978), I am aware of what makes a “good” programming language. We teach these attributes to serious students of language design. Unfortunately, Redmond either didn’t take the classes or neglected their import. As a result, we have C# in its fourth generation (surprisingly not called "C#-4GL"). Generics, LINQ, and so forth have been added. Unfortunately, they were not part of the original C# language. They are "corrections" to missteps taken by Redmond in its attempt to be all things to all people. And they make my programming job much more difficult. I truly would like to see a new, simple, stripped-down version of C#. What I liked the most with the original C# language were the ArrayList and garbage collection. I believe that all the rest is unnecessary object oriented revenge. Peace.
Gus Gustafson
-
Over the many years that I have been programmer, I have detected a growing arrogance on the part of Microsoft employees. I find this strange because Microsoft depends so much upon its customer base. Yet, whenever some flaw is found in its software, Redmond is quick to argue that the bug is really a feature. This has occurred to me, personally, since Visual Studio 4. This arrogance spiked with the release of the C# programming language and its associated multiple .Net frameworks. Having been a member of the X3J9 Pascal technical committee (circa 1978), I am aware of what makes a “good” programming language. We teach these attributes to serious students of language design. Unfortunately, Redmond either didn’t take the classes or neglected their import. As a result, we have C# in its fourth generation (surprisingly not called "C#-4GL"). Generics, LINQ, and so forth have been added. Unfortunately, they were not part of the original C# language. They are "corrections" to missteps taken by Redmond in its attempt to be all things to all people. And they make my programming job much more difficult. I truly would like to see a new, simple, stripped-down version of C#. What I liked the most with the original C# language were the ArrayList and garbage collection. I believe that all the rest is unnecessary object oriented revenge. Peace.
Gus Gustafson
gggustafson wrote: I have detected a growing arrogance on the part of Microsoft employees
"growing"? It has always been there. See big Bill's rant where he called us all pirates back in the 70's. The arrogance has been that they know how to program. I remember rewriting their atrocious garbage collector for Applesoft Basic back in '79. Theirs took 20 minutes, mine took 30 seconds. It is only with the dotNET code that I feel they are finally starting to know what they are doing. And as noted, that we are up to 4.0+, they still don't have it right. And don't get me started on Windows...
Psychosis at 10 Film at 11 Those who do not remember the past, are doomed to repeat it. Those who do not remember the past, cannot build upon it.
-
Because sometimes - very, very rarely - it is the best thing to do. It can save a mess of "get me out of here" bools, and a lot of otherwise unnecessary testing. Having said that, I haven't needed to use it in at least ten years - and I wish teachers were less lazy and didn't start with it on day one to make their lives easier...
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
When goto becomes the best thing to do, I must conclude you're doing the worst thing possible :-D
-
I still don't get why any modern language needs
goto
at all.goto
is a first generation language command. It was already bad for procedural programming, worse for OO, and catastrophic for anything involving multithreading. Not to mention functional programming.Gotos definately do have a place in modern programming languages, according to one of the most influential software dev teachers, Steve McConnell (See http://www.stevemcconnell.com/ccgoto.htm ), and I agree. Obviously its avoidable, but may not always be the best choice.
-
Over the many years that I have been programmer, I have detected a growing arrogance on the part of Microsoft employees. I find this strange because Microsoft depends so much upon its customer base. Yet, whenever some flaw is found in its software, Redmond is quick to argue that the bug is really a feature. This has occurred to me, personally, since Visual Studio 4. This arrogance spiked with the release of the C# programming language and its associated multiple .Net frameworks. Having been a member of the X3J9 Pascal technical committee (circa 1978), I am aware of what makes a “good” programming language. We teach these attributes to serious students of language design. Unfortunately, Redmond either didn’t take the classes or neglected their import. As a result, we have C# in its fourth generation (surprisingly not called "C#-4GL"). Generics, LINQ, and so forth have been added. Unfortunately, they were not part of the original C# language. They are "corrections" to missteps taken by Redmond in its attempt to be all things to all people. And they make my programming job much more difficult. I truly would like to see a new, simple, stripped-down version of C#. What I liked the most with the original C# language were the ArrayList and garbage collection. I believe that all the rest is unnecessary object oriented revenge. Peace.
Gus Gustafson
You're not a very good programmer are you? :doh:
-
I've heard a great deal of praise heaped on C#, but in my encounters with it to this point, I've always come away bruised. In part, that's because it's still changing (and VS .NET with it). In part, it's because I'm a dinosaur who expects the facilities I've come to know and love to remain available and convenient when I "upgrade." But more significant than those reasons or any others is this one: I dislike being "protected from myself."
I like pointers.
I prefer permissive type conversions.
I'm a high expert at picking floating-point numbers apart from their binary representations. (Ever seen old-style IBM floating-point? What about CDC's 60-bit version?)
If I can't substitute an address for an integer or vice-versa, I'll throw a fit.
And don't you dare move something I've put in allocated memory! I'll do my own "garbage collection," thanks very much.My first language was assembler on a PDP-9. I moved from there to the Data General NOVA 1200, still programming in assembler, and from there to the PDP-11, and then to the Intel 8080, 8085, and Zilog Z80, still programming in assembler. Over those years, various persons attempted to convert me to the glories of FORTRAN, Pascal, Algol, APL, PL/I, LISP, and Forth. I spurned them all: not one of them permitted me to do everything I felt I might need to do in some hypothetical situation. When I was introduced to C, for the first time I felt I could "go machine-independent" without losing the full freedom of the machine.
Today I program in C++ and microcode for special-purpose devices. I'm uninterested in C#, Ada, or any other language that attempts to restrict what operations I can attempt. I find it puzzling that other software engineers are willing to accept such shackles. But hey, I told you already: I'm a dinosaur.
I wonder if you'll miss my sort when we're completely extinct...
(This message is programming you in ways you cannot detect. Be afraid.)
This post could have been reduced to: I am too set in my ways and stubborn to learn a new generation of programming languages and the benefits that they offer. You can enjoy your pointers and manual memory management all you want, but you won't be writing any enterprise level web systems with them. And that's exactly the point, isn't it? Use the tool that works best for the job. If you can't see the benefits of a particular tool, that does not indicate that there aren't any; it only indicates that you are unable to recognize them.
-
Gotos definately do have a place in modern programming languages, according to one of the most influential software dev teachers, Steve McConnell (See http://www.stevemcconnell.com/ccgoto.htm ), and I agree. Obviously its avoidable, but may not always be the best choice.
Good article (thanks for the link), but ultimately beside my point. I was arguing that as a language designer for a 3GL (or higher) language, if you think you need the
goto
command, you're doing something wrong. :~ Whether or not a programmer should use a goto command that is available in his programming language of choice, is another discussion altogether. ;) -
gggustafson wrote:
Generics, LINQ, and so forth have been added
IIRC Correctly, generics were always supposed to be part of the language spec, but could not be developed in time for the for 1.0 & 1.1 versions of the framework, following the usual .net pattern of being over-aggressive about what can be achieved per release. This is not a correction. Generics / Template classes were the thing I missed most when I moved from c++ to c# As for LINQ, assuming it is the syntax you object to, you don't have to use it. You can even use the underlying methods (such as
Select
,Where
etc) as methods. So I fail to see why this is a bad thing. Saying that adding features that were not part of the original language is bad, is the same as saying the language should not change.gggustafson wrote:
What I liked the most with the original C# language were the ArrayList
You are kidding right? Again
ArrayList
is still there (sadly) so you can still use it. I can't work out why, in effectList<object>
, which is pretty much equivalent toArrayList
, is better than List<type> because we then need to spend time type-checking and I'd much rather get compile time errors than run-time ones. What is more interesting are the features that have been added that are I'd say are more controversial that you haven't mentioned. I know people who have stopped .net development because of things like dynamic typing, anonymous types and even implicit typing. I at least understand their position, even if I don't agree with it. We can still churn out v1.0 / v1.1 code using the v4.0 compiler (mod any breaking changes to classes) but it is simply harder. As for the increasing arrogance of the Microsoft employees, I don't know, I don't have to deal with them.Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^]Keith Barrow wrote:
IIRC Correctly, generics were always supposed to be part of the language spec, but could not be developed in time
I don't think this is true. Generics only got included in the .NET 2.0 plans because Microsoft Research wrote the full implementation - the main product team's opinion was "generics is for academics only". http://blogs.msdn.com/b/dsyme/archive/2011/03/15/net-c-generics-history-some-photos-from-feb-1999.aspx[^]
Don Syme wrote:
Generics for .NET and C# in their current form almost didn't happen: it was a very close call, and the feature almost didn't make the cut for Whidbey (Visual Studio 2005). Features such as running CLR code on the database were given higher priority.
-
This post could have been reduced to: I am too set in my ways and stubborn to learn a new generation of programming languages and the benefits that they offer. You can enjoy your pointers and manual memory management all you want, but you won't be writing any enterprise level web systems with them. And that's exactly the point, isn't it? Use the tool that works best for the job. If you can't see the benefits of a particular tool, that does not indicate that there aren't any; it only indicates that you are unable to recognize them.
Well, you're right about one thing: I'll never write an enterprise-level web system. That's not my domain: I do real-time systems, usually embedded in a special-purpose ruggedized device. Show me a language + support framework + development environment that beats C++ and VS V6.0 at such tasks and I'll take an interest. Until then, ta-ta.
Dinosaurs of the computing industry, unite!
(This message is programming you in ways you cannot detect. Be afraid.)
-
Ever since my birth I've seen a growing ignorance of behalf of people. They assume what they don't need must be irrelevant to the world, if they don't understand something it must be born out of stupidity, and the future was perfectly predictable if you are as smart as them. Sorry. Umm... peace.
FILETIME to time_t
| FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchypeterchen wrote:
Ever since my birth I've seen a growing ignorance of behalf of people.
I doubt that. Much more likely that the only differentiation, if any, is that you are more aware of rate that is fixed.
peterchen wrote:
They assume what they don't need must be irrelevant to the world, if they don't understand something it must be born out of stupidity, and the future was perfectly predictable if you are as smart as them.
Of course a converse truth also exists.... People who assume that everything that is new should be useful to everyone, that is was created after only a great deal of careful consideration and it should be used whenever possible without constraint. And any attempts to constrain, limit or criticize something new is based solely on the ignorance with no possibility of any other reason.
-
I still don't get why any modern language needs
goto
at all.goto
is a first generation language command. It was already bad for procedural programming, worse for OO, and catastrophic for anything involving multithreading. Not to mention functional programming.Stefan_Lang wrote:
...worse for OO, and catastrophic for anything involving multithreading
How can you construct "catastrophic" code with a goto involving threads for which you cannot do the same thing using some other idiom that involves branching? Certainly both Java and C++ compilers generate most branching idioms that exist in the language specifically by substituting structures that use goto. And both of them seem to handle threading without problems related to that.