C# In-Depth
Bergkamp10 from ComputerWorld writes "Microsoft's leader of C# development, writer of the Turbo Pascal system, and lead architect on the Delphi language, Anders Hejlsberg, reveals all there is to know on the history, inspiration, uses and future direction of one of computer programming's most widely used languages — C#. Hejlsberg also offers some insight into the upcoming version of C# (C#4) and the new language F#, as well as what lies ahead in the world of functional programming."
Could it be that C# is one of the most widely used simply because of the installed base of windoze machines all over the world and not because of any technical merit? Most current languages have compilers and interpreters that run on windoze; what makes people choose C# over the others? Just how much impact has C# had on computing sciences as a whole, anyway?
>>one of computer programming's most widely used languages.
I highly doubt that a language that has only been around for a few years is the most "widely" used computer language. Cobol, fortran, or standard C , maybe.
Yes you must be out of the loop to some degree if you have only met a handful of people developing in it. It certainly is not obscure. Where I am there is more C# work going on than any other single language.
Could that be partly due to the fact that a literal monkey could code it? Hell, most of the code you'd ever need for any program has been posted by some Microsoft programmer on MSDN so the only skill developers have to know is cut and paste. I don't know how many times I've looked through code with myObject and myHttpWebRequest because the developer was too lazy to even change the variable names to fit the purpose.
Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
Well there is fragmentation produces as they introduce YET another language.
So? That's a problem for Windows developers. Why should a Java programmer care? In the realms where Java is popular, C# has had basically no influence. So MS has, at worst, fragmented the Windows development ecosystem... big deal. :)
You currently cannot say C# replaces C++ on Windows platform as using any DirectX components for example is nightmare through C#.
...
More on the major downside of writing .NET applications is that you cannot guarantee that the stuff I work on my Vista workstation works on my co-workers XP workstation.
But none of this has anything to do with fragmentation to begin with. You're getting off-point. And that's ignoring the fact that, once again, this is a problem for MS... the rest of the programming world doesn't care one whit how hard DirectX is to integrate with C#.
Can it be a success when it cannot be used to produce major parts of their own operating system.
Last I checked Java wasn't being used to write operating system components, yet no one claims it's a failure. Now, that's not to say C# and .NET are unbridled successes, but that's a pretty crappy metric for making the call.
Yeah, but people hated C# and love Java about like they do now before Java was open sourced.
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
Pretty sure that music precedes unicode, dude, and they write the sharp sign using anything that looks like a tiny smooshed tick-tack-toe board.
If a sharp sign is the same as an octothorpe because it has a similar (but not identical) shape, then a flat sign must be the same as a lower-case "b". As it happens, however, neither pair of symbols have ever been interchangeable.
Behold, the "coding standards company" whose web site requires javascript.
What a bunch of clowns!
Java hasn't been an interpreted language in a long, long time.
Yeah, it only took twelve years for that to happen. I guess C# just won't get around to it for another five years.
Oh goody. Another mindless Microsoft-basher who wants to try to whore up some free karma by saying untrue things like "slightly altered" and "nonstandard" about C#. Oh goody.
"16MB (fuck off, MiB fascists)" - The Mighty Buzzard
The implementation is about the same in both languages, but using it is much nicer and cleaner in C# than in Java.
That really is a matter of opinion. In Java, it's pretty clear that you are requesting or modifying a property of the object. In C#, you are using assignment to represent that mechanism so you might be accessing a public member variable directly or calling a method to achieve that end. To me, the Java method is more explicit and therefore less prone to error.
Cheers,
Toby Haynes
Anything I post is strictly my own thoughts and doesn't necessarily have anything to do with the opinions of IBM.
On a piano keyboard to play E# you press the same key as for F, so it gives the same sound. But I *think* this is not true for every instrument. Some instruments can produce different sounds for E# and F. Then there are the considerations of music theory and notation which others have pointed out.
-- Ed Avis ed@membled.com
ISO's meaningfulness is diminishing.
> Turbo Pascal and Delphi were popular because 20 or so years
> ago universities taught Pascal to their computer science students.
False, or else MS-Pascal would have become equally popular. Turbo Pascal was popular because it only cost $44.95, thus falling into the "buy it for a lark, try it, and toss it if it isn't good" buying space. Turbo C and Delphi, in their first versions, were equally under-priced, compared with $250 or so for MS compilers, and over $500 for some of the really good C compilers.
The really good, independently produced, compilers died away as Borland's cheapness and MS's standardness (not real standards, THEIR standards, but they wrote the OS, so *surely* they had the best tools? NOT) gradually undercut their niches. The first Turbo versions were crippled from the POV of professional programmers, but were good enough for students, amateurs, etc., and Borland then introduced better compilers for higher prices, until the best version was about as expensive as MS C, but slightly better (following the old GM strategy of cannibalizing yourself, rather than letting competitors do it, by covering all the price points). GNU C also helped kill them, as it was also good enough to make the other compiler companies' offerings redundant.
> About the time Delphi came out, things moved on
> and they began teaching C++ which pretty much
> killed Delphi off.
Actually, the programming market had only moved from Pascal to C, but Delphi was very wed to Pascal and its idioms. It also ran into the wall, in that the REALLY complicated stuff that professionals did was beyond it, and Borland didn't have a follow-on product.
Better than C#? Well, how many platforms can you name that C++ is not available for? If you're willing to go back to an early version of C++ it compiled via C (may be possible even for current versions, I've never bothered looking into it), so at least some version of C++ would run on anything that runs C (and had enough resources).
Quidnam Latine loqui modo coepi?
"C# ... is very popular ..."
By "very popular" I take it you mean less popular than Perl or Python, but more popular than Delphi.
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws-Plato
I was a 15-year old kid with a copy of Turbo Pascal. A very dangerous thing back then.
Aha! "Turbo Pascal, the PHP of the '80s."
Java: Properties are private variables/methods exposed through a public method. Seems unnatural and tedious when accessing a guarded variable, e.g.
Line.GetWidth(); Line.SetWidth(10);
Two different calls for accessing a single property.
C#: Properties are private variables/methods exposed through a public variable. May be cause for surprise e.g. when
Line.Width++
increases width and executes statements outside the scope of width increase.
For exposing a (guarded) private variable I prefer the C# way, but it's too easy to mix data with flow.
I don't feel a property can be accessed as either a variable or a method, because it isn't and adds to confusion.
Here are some problems with Python:
* significant whitespace does not play well with common development practices (merging, diff'ing, copying, pasting code, esp. on web pages)
* GIL makes it very hard to scale or completely unscalable in some situations
* no support for static typing makes large projects harder to manage
* not truly cross platform - a lot of common libraries are implemented in C and thus you have to install native code for them to work - bad luck if there isn't a binary for your platform.
* no common standardized GUI toolkit
* poor commitment to backwards compatibility - Python 3k is going to break compatibility in major ways as did releases before it
* awkward and ugly object oriented semantics (declaring "self" in class methods, ugh)
* poor IDE support
* poor adoption - not sure what makes you think the labor pool for Python is better than other languages
I'm sure a dozen python supporters will jump up and object to all these - there is hardly anything revolutionary about these criticisms and most of them have been fought to death in enormous flame wars in the past. But the end result is, Python is not great for a lot of "enterprise" type situations due to these things (and you will quickly see how sensitive pythonistas are to this snub since they constantly mock the word "enterprise" on mailing lists etc.). In other situations it can be brilliant.