Slashdot Mirror


C# 2.0 Spec Released

An anonymous reader writes "Microsoft released the design specifications document for C# 2.0 (codenamed 'Whidbey') to be released early next year. New features of the language include generics similar to those found in Eiffel and Ada, anonymous methods similar to lambda functions in Lisp, iterators, and partial types."

64 of 634 comments (clear)

  1. gc#? by Anonymous Coward · · Score: 2, Insightful

    Ok, I know I'm a bad coder for liking C sharp, but gcc should really support it - like it or not, college computer science people *are* learning it, and Free software should support it. In fact, supporting visual basic compilation wouldn't be a bad idea either...

    1. Re:gc#? by Anonymous Coward · · Score: 2, Insightful

      put your money where your mouth is; so to speak :)

      gcc is Free software; so download the source and add c# or visual basic support. Once you get the ball rolling others will join in and help.

    2. Re:gc#? by termos · · Score: 5, Informative

      Maybe you want to take a look a mono.

      --
      Note to self: get smarter troll to guard door.
    3. Re:gc#? by Miguel+de+Icaza · · Score: 3, Funny

      No doubt in doing so violating some Mr Softie software patent and thus receiving a cease and desist.

      actually i would doubt it

      --
      Before adopting WHATWG, read the moonlight.NET EULA [http://www.microsoft.com/interop/msnovellcollab/moonlight.mspx]
    4. Re:gc#? by edalytical · · Score: 4, Insightful

      college computer science people *are* learning it

      What colleges are teaching C#? At my school we had one Pascal course then went into C followed by C++. I believe we could have taken Assembly right after Pascal, but I'll take that after I finish C++. I've heard of other schools starting with java or even python. I'm not arguing that schools don't teach C#, I just want to know which ones do so I can be sure not to transfer there.

      --
      Win a signed Stephen Carpenter ESP Guitar from the Deftones: http://def-tag.com/?r=0008781
  2. Code name by flynt · · Score: 4, Informative

    Whidbey is the code name for the next Visual Studio, not just C#.

    1. Re:Code name by gfody · · Score: 2, Informative

      if(x = 1)...

      still not even a compiler warning.. *sigh*

      --

      bite my glorious golden ass.
  3. moving towards bloatware or are these important? by Anonymous Coward · · Score: 2, Insightful

    You've truely engineered something great not when you can't add anything more to it, but only when you can no longer remove anything from it.

    Its great that they are adding new features. But are they removing anything that was decided to be a bad idea? Now is the time to do it, in the early versions shortly after its birth, before there is too much legacy code...

    Will MS begin to use this for its own products like Office in the near future?

  4. Re:Whidbey? by ergo98 · · Score: 2, Informative

    There's an island just outside of Seattle that is called "Whidbey Island".

  5. follow the link by buddydawgofdavis · · Score: 2, Funny

    Seems like a pretty limited spec.

    All it says is:
    Plugger: No approperiate application for type application/msword found!

    whatever...

  6. Code Name by boatboy · · Score: 2, Insightful

    Actually, Whidbey is the code name for the next release of Visual Studio and .NET Framework. C# is just a part of it. http://msdn.microsoft.com/vstudio/productinfo/road map.aspx#whidbey

  7. Re:Who gives a shit about C# by Anonymous Coward · · Score: 4, Insightful

    C# is ECMA standardized. Java is wholly owned by Sun. Sun has repeatedly balked at standardizing Java due to the inherent loss of control.

    Perhaps there are potential submarine patents, but Java is absolutely vendor-tied while C# is at least relatively open.

  8. Ruby Continuations by Llywelyn · · Score: 2, Informative

    I'm still not sure why one would use continuations for well-designed code (kind of like labels in C++). I think the Ruby FAQ has the best statement on continuations.

    -----
    Ruby's continuations allow you to create an object representing a place in a Ruby program, and then return to that place at any time (even if it has apparently gone out of scope). Continuations can be used to implement complex control structures, but are typically more useful as ways of confusing people.

    --
    Integrate Keynote and LaTeX
    1. Re:Ruby Continuations by Piquan · · Score: 3, Informative

      Okay, no offense, but that's the worst description of continuations I've ever heard. It seems to be giving people ideas that it's like goto, which is a common reaction people have when they first hear about continuations. But it's not accurate. Goto manipulates the instruction pointer alone; continuations manipulate the entire stack in much more interesting ways.

      There's some good stuff on continuations out there. They have little use in imperative programming styles like C++ encourages. In functional styles, they're used to implement exceptions, non-determinism, coroutines, generators, and a host of other control features that can open up whole new worlds of programming.

      The crack about "ways of confusing people" doesn't mean that continuations tend make your code unreadable, like goto. It means that continuations are a confusing concept, but if you understand continuations, you can make much clearer code.

  9. Re:Does adding every ingredient make it better? by Tom7 · · Score: 5, Insightful

    No, but consider the competition. C++ is insanely complicated and broken, and is popular. Perl is insanely broken and complicated, and it is popular.

    Anyway, anonymous higher order functions and generics are two really glaring deficiencies in Java, C#, and many other modern OO languages, so adding them is a step in the right direction. It's not as if these are minor, useless features.

    > Is this their plan to "lock in" universities to teaching microsoft programing to all levels, because it will take
    > 4 years of classes just to cover it all?

    That's crazy. Universities don't teach programming languages except as tools to teach more important concepts.

  10. Perl 6 will have continuations by Anonymous Coward · · Score: 3, Informative

    Perl 6 will have continuations...

    http://www.sidhe.org/~dan/blog/archives/000156.h tm l

  11. Re:Sea Number/Sea Sharp by saden1 · · Score: 2, Funny

    I like to think of it has C Pound.

    --

    -----
    One is born into aristocracy, but mediocrity can only be achieved through hard work.
  12. Re:moving towards bloatware or are these important by wjsteele · · Score: 2, Interesting

    You can already develop in C# for Office with Visual Studio Tools for Office.

    Bill

    --
    It's my Sig and you can't have it. Mine! All Mine!
  13. Why C# doesn't Totally Suck by Pflipp · · Score: 5, Interesting

    OK so I'm in the position of having to write an emergency support application for a M$-based system in a M$-based environment. Stuck in there. Completely. Been requested to make a maintainable, manageable solution. And yes, this is to say "make it for M$, with M$ tools as much as you can".

    I guess even within these circumstances, I'd have refused to open Visual Studio for this project, if it didn't say ".NET" as well. I mean, think of it: previous versions of VS only supported C++ or VB, with APIs to cry for (admittedly, I don't know about MFC, only about Win32).

    I actually happen to dislike C++, but on top of that, it doesn't suit my project, because the low-levelness makes it harder to program without errors (e.g. null pointers, memory leaking). I'd rather have a language at a scripting level -- and NO, that's NOT VB. I hope I don't have to explain why I hate VB if only on very first sight.

    So with .NET, M$ introduced a quite nice API and Java language (come on, where are the real differences) into Visual Studio, which at least saved my day; I had found an acceptable programming environment for within Windows..!

    There's really no need for anybody to pick on C#, long as it's realized that it's just finally a nice programming environment for Windows, and nothing (well, not much) more. (BTW, it's not much different from NeXT (now Apple)'s use/ takeover of Objective C.)

    --
    "We can confirm that Debian does *not* ship the version with the trojan horse. Our version predates it." [CA-2002-28]
    1. Re:Why C# doesn't Totally Suck by krumms · · Score: 4, Informative

      come on, where are the real differences

      I thought the same thing. It's actually lots of little things that make C# nicer all 'round (in comparison to Java): Most pleasant for me is the fact that I can use enumerations without (a) declaring a new class/interface (b) placing a ridiculously long "public static final int" before EACH member of the enumeration and (c) being able to use the newly declared enumeration's new type name for parameters instead of just "int" - remember semantics?

      Integrating legacy shit is also a snap with C#. Sure, managed C++ is better, but have you tried doing the same thing in Java? Yuck.

      Lots of little things like this, IMHO, make C# better than Java.

      I hate the fact that Microsoft charges an arm and a leg for Windows/MSVS/everything. But I like C#.

      If only it was cross platform from the word go. Mono's nice, but the MSVS IDE is what keeps Microsoft/Windows up and above Linux as far as ease of development goes.

      Python's better than everything else anyway. *hides* ;)

    2. Re:Why C# doesn't Totally Suck by penguin7of9 · · Score: 2, Interesting

      If only it was cross platform from the word go. Mono's nice, but the MSVS IDE is what keeps Microsoft/Windows up and above Linux as far as ease of development goes.

      For some people, perhaps. I find the MS development tools so nauseatingly bad that they are one of the main reasons that I don't do anything with Windows.

      Fortunately, on Linux you get a choice: excellent command line tools and IDEs. On Windows, unfortunately, you don't: Windows command line tools simply are completely useless.

  14. Re:Does C# have continuations? by Tom7 · · Score: 4, Informative

    You should get out more. There's a world of programming paradigms most people have never heard of, because they're still stuck using C-alike block structured OO languages.

    Continutions are, roughly speaking, a generalization of setjmp and longjmp in C. However, to have true "first-class" continuations they need to be objects that you can pass around, store in data structures, etc. In C this isn't true, because if you return from the stack frame that did the setjmp, the continuation is invalidated. Lisp has "call/cc", some implementations of ML have "calcc" (typed), and many scripting languages have it, because it's pretty easy to implement in an interpreted language.

    Continuations can be used to implement exceptions, user-level thread packages, "early exits" from recursive code, and other cool stuff.

  15. Re:Does adding every ingredient make it better? by Qzukk · · Score: 3, Insightful

    That's crazy. Universities don't teach programming languages except as tools to teach more important concepts.

    Thats a great idea. Sounds great on paper, sounds great in theory. Sounds great while you're playing around with a bubble sort.

    After that, its a load of crap.

    Tell you what: You learn your bubble sort however you want. Your assignment is to write a program that uses a row colored spheres with numbers texture mapped to the surface of the sphere to demonstrate how the bubble sort actually operates.

    I learned to do this at my university, and was lucky enough to get a professor that hadn't bought into the Windows Thing, and tought graphics programming with OpenGL (available everywhere) instead of DirectX (available in windows, and if you're lucky, wine).

    In fact, when you get out of your pretty little university, you can try and get a job on "I know my programming theory". If you don't know the language and APIs that Company X is using, you're sunk. These days they don't settle for learning on the job. I had a wonderful job interview for developing an interesting application, I wowed them all with my knowledge, except for one little thing: I didn't know Perl/GTK which was what they were writing their application in. A few weeks later I got a check in the mail for my flight, car rental, and hotel and a thank you letter for taking the time to interview them in person.

    --
    If I have been able to see further than others, it is because I bought a pair of binoculars.
  16. innovation by pizza_milkshake · · Score: 3, Insightful

    wow, that will they think of next?

  17. Re:Does adding every ingredient make it better? by yoshi_mon · · Score: 3, Insightful

    C is a low level language and makes no bones about it being such.

    Is such a high level language such as one that is designed to run upon other protocals the same?

    No.

    --

    Really, I know what I'm doing...Ohhhh, look at the shiny buttons!
  18. Re:Does C# have continuations? by Gorobei · · Score: 3, Informative

    It's Scheme that has call/cc. Common Lisp didn't provide it (though it's not hard to write something similar if you really want it.)

  19. Re:Sea Number/Sea Sharp by AJWM · · Score: 4, Funny

    It's really C-Hash.

    Or as Microsoft execs like to pronounce it amongst themselves, cash.

    --
    -- Alastair
  20. Re:moving towards bloatware or are these important by Sivaram_Velauthapill · · Score: 4, Informative

    Removing something is very difficult. In fact, it is not recommended (unless it is a serious flaw or bug). There may be millions of developers using a particular feature or programming technique that is "bad". If you go and remove it, it could adversely affect all these programmers and their existing code. This is one reason why companies don't really remove features. Backward compatibility in software is absolutely crucial (especially when you force developers to upgrade to new versions all the time).

    The best thing to do is to "phase" out the undesired feature by not recommending it, not featuring it prominently in books, shifting features into optional components that must be installed, etc.

    I know this isn't exactly the ideal way to do things but I see no other way. I mean, if I was responsible for Visual Studio (or C# specifications), I would not remove features. Who knows who is using a particlar feature?

    Sivaram Velauthapillai

    --
    Sivaram Velauthapillai
    Seeking the meaning of life... @slashdot of all places ;)
  21. Re:Sea Number/Sea Sharp by Jeremy+Erwin · · Score: 3, Interesting

    I still find it vaguely amusing that Microsoft released a product which cannot be properly displayed in the Latin-1 character set,
    The octothorpe symbol, '#', has slanted vertical strokes. The "sharp" sign has slanted horizontal strokes.

  22. Re:Does adding every ingredient make it better? by deranged+unix+nut · · Score: 4, Insightful

    Personally, a "broken" language is a language that requires so much work to do things right that programmers that use them frequently do things wrong. For example, my all time favorite security flaw: the buffer overflow.

    A good language should support the development of code that doesn't contain common flaws. In my opinion, C and C++ are directly responsible for security flaws that cost trillions.

  23. Re:Why should I care? by funked · · Score: 5, Informative
    I've been using C# for about a year or so now. I started with Java, and made a clean switch to C# for a few projects that required it. I don't think that it will ever replace any of the three P languages, but is more targeted at taking Java down.

    I'm not a full-time developer, I usually develop some basic web applications to enhance some of the new solutions I implement for Systems Administration. My experience with it is limited, but I'll give you my pro's and con's:

    Pro's

    Easier access to IO - just try it in Java and see. It's much faster in C#

    Improved XML support - also a lot simpler in c#

    Not as many third party specifications to learn. I remember having to learn Struts, Ant, Tomcat, and then Sophia after learning JSP - what a pain in the ass.

    MSDN - The help system inside VS.NET is better than most languages' will ever be.

    Con's

    Not the best IDE in my opinon - IntelliJ smokes Visual Studio.NET in almost every respect(except for the help).

    Can't use it on Linux or BSD - my applications are bound to fail more frequently than an equivalent Java/PHP/Perl app running on a secure box.

    Most of the support I used to recieve about Java, Python, and other open source languages don't discuss c#. There just aren't the same amount of mailing lists, IRC channels, forums, to throw around C# ideas. The ones that do discuss it tend to cater to the Lowest Common Denominator.

    I have to resort to Visual Studio 6 in order to create desktop applications that run on everyone's machine. The .NET framework has been a hard sell for the enterprise I work in.

  24. Re:Who gives a shit about C# by aled · · Score: 3, Informative

    What exactly do you mean by undocumented? The language and virtual machine are fully documented, you can download the sources to jdk and libraries, and is much more open than C$, though less than others open source projects.

    --

    "I think this line is mostly filler"
  25. Re:Does adding every ingredient make it better? by Randolpho · · Score: 4, Insightful

    Universities are right to teach important concepts (and not just algorithms like bubble-sort -- that's friggin freshmen stuff anyway) like software engineering, project managment, relational algebra (i.e. database stuff), networking, AI, parsing, logic, circuit design, and (I'm lumping here) under-the-hood operating system concepts.

    If you've got a Computer Science degree, and you payed attention, you can pick up the syntax for a new language within an hour. With a good API reference, you can be banging out code like an old pro with a weekend of study. It's not that hard.

    What matters far more than how well you know a language is how well you know how to program. Any monkey with a keyboard can whip out a Visual Basic app.

    But to write truly masterful code... that transcends skill with a language and approaches art.

    That said, I'm going to contradict myself: it's important to know the basic capabilities of the language you're working with. Java would be a shitty language to write, say, a program that computes the sum of the two numbers input to it on the command line, because it takes so long for the VM to load -- far more than the actual execution time of the program.

    Fortunately, things like that can be quickly learned.

    --
    "Times have not become more violent. They have just become more televised."
    -Marilyn Manson
  26. Re:Does adding every ingredient make it better? by delirium28 · · Score: 2, Informative
    >That's crazy. Universities don't teach programming languages except as tools to teach more important concepts.

    Not true. Check out University of Waterloo as an example of Microsofts approach to exposing C# to a new generation of developers. Well, engineer's, but close enough. ;-)

    --
    Who is John Galt?
  27. more info by rabtech · · Score: 3, Informative

    First off, Whidbey is the next version of Visual Studio, which is designed to use the dotnet framework v2. The SDK will be released publicly around the same time, so those who prefer Notepad need not pay one cent to write dotnet apps.

    Secondly, generics, partial types, and such are being added to the CLR, as well as Microsoft's "first-class" languages, meaning that yes VB.NET will include them. VB.NET also gets operator overloading, native support for unsigned types, and in-line XML commenting.

    You can read it all at the roadmap here:
    http://msdn.microsoft.com/vstudio/productin fo/road map.aspx

    It tells about some of the changes to the IDE, the CLR, and the languages. One interesting new "feature" is a sort of grammatical analyzer for writing code that will suggest improvements or corrections, similar to the way word underlines misspellings or grammar errors.

    Whether it will be a great tool or a bloody nuisance remains to be seen.

    --
    Natural != (nontoxic || beneficial)
  28. the kitchen sink too? by ashultz · · Score: 2, Insightful


    The next version will of course have features from Esperanto, Mandarin, and Martian.

    I'm all for extending a language, but they haven't had C# around enough to be larding new stuff on. The language already had several ways to do most things, now they're adding more?

    If we wanted ten ways to do anything, we'd use perl. If we're not using perl, that usually means we like to be a little more constrained.

    -andy

    1. Re:the kitchen sink too? by addaon · · Score: 2, Funny

      Java supports chinese variable names. Don't ask me how I know this. Don't ask my coworkers, either.

      --

      I've had this sig for three days.
  29. Re:Why should I care? by Baavgai · · Score: 2, Informative

    C# is basically Java for Windows, take two. It does seem to have learned from the evolution of Java and cleaned some of the messier bits.

    Exception handling is a little looser, without the need to declare thrown exceptions or catch those declarations. There is a still an exception based error handling system, it's just more implicit than explicit.

    I really like the properties, an idea they took from Visual Basic. At some point in Java history (birth of EBJs?) it was concluded that public class variables were a bad idea. Java standardized on a getter / setter model that is more a convention rather than a language rule. C# uses a property, which has either a get, set, or both. If fills the same OOP niche, only more cleanly.

    There is also some neat static ( class level ) functionality. Interestingly, while exceptions aren't explicit, inheritance is. A method must be declared virtual to be overridden, a more C++ thing to do.

    Basically, there are many little changes from Java that make C# not Java. But, the changes do make sense and make C# an enjoyable language to program in.

  30. It's already there in Java 1.5 by blamanj · · Score: 4, Informative

    Enums have been added, generics have been added, automatic iteration in for loops have been added, et cetera. True, it hasn't been released yet (the first Java 1.5 betas are due next quarter), neither is Whidbey, and the JSRs have been out for some time, and the prototype compiler with generic support has been available for months.

  31. Ask a stupid programmer.... by emarkp · · Score: 2, Insightful
    I actually happen to dislike C++, but on top of that, it doesn't suit my project, because the low-levelness makes it harder to program without errors (e.g. null pointers, memory leaking)
    It's not surprising that a poor programmer likes C#--it's designed for people who can't design and code well. It's a continuing trend of giving more band-aid's to a language to compensate for lazy and/or incompetent programmers.

    Here's a clue: null pointers and memory leaks are not "low level" problems--they're logic errors. Dereferencing a null pointer can happen in Java, and accessing a disposed object can happen in C#. Memory leaks and null pointers usually mean you aren't managing an object's lifetime correctly, and are typically symptoms of design errors (or minor bugs--off by one, etc.--which can happen in any language).

    C# is like most MS tools--great for 80% of the work, but the last 20% is difficult or nearly impossible because MS didn't think of the problem you were trying to solve, and the language isn't flexible enough to adapt.

    Finally, it is impossible to report errors in the implementation. When I found a serious error in the .Net runtime, I tried several ways to report it, getting no answer, or in the case of the microsoft.* newsgroups, assertions that I couldn't find bugs since the high-and-mighty MS and testers hadn't find it.

    Sigh. Compare that to the people who hang out in comp.lang.c++.* -- I ran screaming away from C# as quickly as possible.

    1. Re:Ask a stupid programmer.... by emarkp · · Score: 2, Insightful
      Goto the source, MS. Plonk your 200 bucks down and report it. If it is a REAL problem you will get your 200 bucks back if its YOU they keep it. ...

      They do not respond well to 'its broke fix it'.

      Gee, and I thought my MSDN Enterprise subscription would be sufficient. Why should I plonk down $200 to report a bug? I didn't want an immediate fix, we already had a workaround. I just wanted to report a bug. I had sample data and exact steps to reproduce it.

      Instead I simply stopped using C# and went on to better things. I'd rather have a language and implementation that works, and has a useful community than one that MS is pushing as 'the next big thing'.

    2. Re:Ask a stupid programmer.... by emarkp · · Score: 2, Insightful
      It's amazing what gets marked as "Insightful" around here.
      Ah, when asked to defend the indefensible (C's insane design) instead declare yourself an expert and attack the person raising the issue as " lazy and/or incompetent".
      Um, no. I was responding to the so-called "low-level problems" of C++ (not C). Null pointers are useful in a function to represent an object, or the fact that an object is not available. Dereferencing a null pointer is a logic error, because it means the object isn't available. Dereferencing it means your logic doesn't know the difference between a valid object and a non-existant object. Failing to understand the difference is a mark of incompetence or laziness. Hence my comment. Most memory leaks can be eliminated with auto_ptr (now in the standard for 6+ years) or boost's smart pointers. Simply slapping garbage collection onto a language doesn't solve this. In the case of C#, you lose deterministic destruction, which means that you can't properly clean up objects that are owned by the object being destroyed. C# forces you to kludge around this by checking to see if the object is being disposed of manually, or by the system, e.g.:
      protected virtual void Dispose(bool disposing) {
      if (!_disposed) {
      if (disposing) DisposeManaged();
      DisposeUnmanaged();
      }
      _disposed = true;
      }
      Of course, this fails in a multithreaded program. So you have to lock the internal variable if you want thread safety.
      The problems cited are language problems. Yes, you can do workarounds and never create a bug but a competent language should make it easier to write bug-free code not add land mines to swagger over.
      Sorry, they are not language problems. Real language problems in C and C++ are e.g. integer promotion rules and syntax ambiguities which sometimes parse a function call (typically a constructor) as a function declaration. If you still think these are language problems, be honest and point out that C# has them too. For instance:
      SomeObject oops;
      using (SomeObject so = new SomeObject())
      {
      oops = so;
      }

      oops.DoSomething(); //BOOM!!!
      And the garbage collection doesn't help with database connections, graphics widgets, etc. You must manually dispose them if you want them to work reasonably. How, precisely is this any better than manual destruction?
  32. Not quite the same thing. by devphil · · Score: 3, Informative


    The quote that the parent AC plagarized is from Antoine de Saint-Exupery, the French aircraft designer living in the first half of the 20th century. (And author of The Little Prince, if that hasn't been banned in America yet.) He was speaking in the context of original design, not individual features.

    While the plane is still on paper, that's the time to remove all the unneccessary cruft. That's de Saint-Exupery's point. Not after the plane has been built; then the dependancy problems you mention arise. That's not the proper time. Certainly not in midflight.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  33. Re:Who gives a shit about C# by User8201 · · Score: 3, Funny

    "C# is ECMA standardized"

    BWhahahaha, you fell for that, huh? Propaganda makes trolls all over the world.

  34. Re:Why should I care? by Bobbysmith007 · · Score: 3, Informative
    Background:
    I'm in web development ( full microsoft environment ) using C#, SqlServer2000, WinXP

    Pros:
    1. Great documentation (ala MSDN) for extensive, helpful base classes
    2. Very flexible and readable
    3. XML comments integrate with the Visual Studio .Net IDE to create developer time tooltip documentation
    4. Its very easy to create and manage many layers of abstraction such that any layer can be changed without needing to alter much code elseware.
    5. Very easy IO using the System.IO name space base classes. Great objects that are arranged fairly standardly that just take the frustration out of alot of the repetitive work.
    6. While I generally dont know the implementation of a base class object (see con 1), They do seem to be very well implemented in most cases
    7. While not useful to everyone, It has very good SqlServer classes in the System.Data.SqlClient namespace. The syntax used is standard, well documented, easy to pickup, fairly powerful, and very flexible. I deal with a decent sized database and there tools for every purpose, it seems.
    8. Because of the excellent auto-complete and tooltip comments, its a pretty quick language to pick up with just Visual Studio Help(MSDN) and the IDE.
    9. The property is a great addition to the standard syntax of the language. It allows the getter, setter functions to be treated a public variable. I think this helps realize a truly object based system a little better.


    Cons:
    1. As far as Ive found there is little documentation on the inner workings of the base classes
    2. Its from Microsoft who I generally consider money grubbing, domineering whores
    3. All .Net apps need the .Net Runtime in order to be run. This creates compatability issues even amongst older versions of windows (as the vast user base doesn't see the need to patch (ie older members of family))
    4. Its native source control (Visual Source Safe) is a pain in the ass to use, and I found it somewhat unreliable.
    5. Im not a terribly big fan of VSNet's HTML designer. To be objective about it though I must admit that after changing its default view to HTML instead of design, Ive never flipped back so I have very little experience with it.
  35. Re:Who gives a shit about the ECMA? by Arker · · Score: 3, Insightful

    Have things changed so much that we can trust Microsoft and its "standards body" largely consisting of companies dependent on Microsoft to keep all extensions to this "standard" in the open and available to all players?

    Of course not.

    But those who don't remember history are doomed to repeat it.

    --
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Friends don't let friends enable ecmascript.
  36. C# generics on built-in types do not use boxing... by truth_revealed · · Score: 4, Interesting

    From the C# 2.0 spec:

    "When an instance of Stack<int> is created, the native storage of the items array is an int[] rather than object[], providing substantial storage efficiency compared to the non-generic Stack. Likewise, the Push and Pop methods of a Stack<int> operate on int values, making it a compile-time error to push values of other types onto the stack, and eliminating the need to explicitly cast values back to their original type when they're retrieved."

    Java uses Object boxing for built-in types in their generics implementation.

  37. don't you read telephone manuals!? by SHEENmaster · · Score: 2, Interesting

    It's Sea Octalthorpe. I would've called it ++C, but that implies that something is actually more advanced than C.

    Honestly why should one bother? It's neither portable nor natively executable. It's neither scalable to embedded systems nor to high-end servers. It has neither legacy code nor a bright future.

    Mono is a good start, but M$ will fight it when it starts to show results. .NET's pupose is not to allow Windows software to run on other platforms, but rather to help M$ capture more platforms. It's doomed from the beginning, and will be another forgotten buzzword within a few years.

    I like Java, I like C, and I like C++. Each of them rock and suck in different ways.

    --
    You can't judge a book by the way it wears its hair.
  38. Re:Sea Number/Sea Sharp by AuMatar · · Score: 2, Funny

    Please. Its just C. The rest of the line is a comment.

    --
    I still have more fans than freaks. WTF is wrong with you people?
  39. Re:booooring by penguin7of9 · · Score: 3, Interesting

    Java announced Generics months ago. In all, it seems like the java stuff is more exciting, although the lambda-like stuff in C# seems interesting.

    Java generics are broken because they don't guarantee type safety across compilation units. That requires VM changes, changes that Microsoft was willing to make but Sun wasn't.

    Java is more and more turning into an accumulation of evil kludges. Instead of type-safe generics, we got a hack. Instead of lexical closures, we got nested classes. Instead of structs, we got some half-hearted promise of optimization under some nebulous set of circumstances that can't work in general. Instead of multidimensional arrays, we got some classes with a horrendous syntax that, on some theoretical JIT, might actually run faster than a snail.

    I don't know whether C# will grow up into a well-designed general purpose programming language, but it is crystal clear that Java has missed the boat.

  40. Re:ugh by Slime-dogg · · Score: 3, Insightful

    Wrong.

    Pascal is not meant for serious programming like C is, but Pascal has sorta grown into this business application language, and is far from obsolete.

    You also cannot do anything in C++ that you can in C. You can do this in C, but not C++:

    void f(); /* argument types not mentioned */

    void g()
    {
    f(2); /* poor style C. Not C++ */
    }

    Or...

    void* malloc(size_t);

    void f(int n)
    {
    int* p = malloc(n*sizeof(char)); /* not C++. In C++, allocate using `new' */
    char c;
    void* pv = &c;
    int* pi = pv; /* implicit conversion of void* to int*. Not in C++ */
    }

    These examples were shamelessly ripped from Bjarne's FAQ, which is available Here.

    --
    You need to restart your computer. Hold down the Power button for several seconds or press the Restart button.
  41. Re:Why should I care? by AuMatar · · Score: 2, Insightful
    I'd like to comment on some of your pros here.

    # Easier access to IO - just try it in Java and see. It's much faster in C#


    I'm the last man in the world to support Java, but C# is optimized to windows, and probably matches the OS's file system better. I'm not sure if C# would do as well in an non-MS environment


    # Improved XML support - also a lot simpler in c#


    This is a pet peeve of mine. LANGUAGES SHOULD NOT BE DEBATED BY THEIR STANDARD LIBRARIES. Don't like a library? Download another. Buy one. I'm sure theres 50 gadzillion XML libraries floating around. Chances are you'll like one better than the default. If you want to debate languages, debate the features of the language- what does one language enable you to do natively that another doesn't, or what does one make easier?

    This is why languages should NOT have huge libraries. The designers of a language do not get everything right, especially the first time through. Invariably, third party designers who can focus in on one area can make a better API. In languages where they have huge standard libraries, like Java and C#, people tend not to bother because there's one already there. Unfortunately, that makes people end up using terrible APIs (the original Java gui, anyone?), and leads to a lot of bad comparisons between languages that have nothing to do with the languages.

    # Not as many third party specifications to learn. I remember having to learn Struts, Ant, Tomcat, and then Sophia after learning JSP - what a pain in the ass.


    They'll come, C# hasn't been around as long. ALthough what the hell those things are I don't know (and beign a C programmer, never will need to. Nah!)

    # MSDN - The help system inside VS.NET is better than most languages' will ever be.


    I've found a lot of inaccuracies in MSDN, although I admit the idea is nice. But comparing webpages about the two languages in a language comparison? Just plain inane. A nice help page or not has nothign to do with a language!

    # Not the best IDE in my opinon - IntelliJ smokes Visual Studio.NET in almost every respect(except for the help).


    Again- the IDE is not a language feature. Its not really a good way to compare two languages.
    --
    I still have more fans than freaks. WTF is wrong with you people?
  42. Re:Why should I care? by pHDNgell · · Score: 2, Interesting

    Not as many third party specifications to learn. I remember having to learn Struts, Ant, Tomcat, and then Sophia after learning JSP - what a pain in the ass.

    You would consider it a feature that there aren't third-party tools to improve development and deployment?

    I have no idea what Sophia is, but I used java for a long time before hearing of struts and ant (you know, you can use Make with java). Struts takes the generic specs and makes things a lot better. They're both optional. Like many other misguided souls, I've written apps completely in jsp as well.

    Third-party options that fit into standards, make things better, but are not required are an advantage, not a disadvantage.

    --
    -- The world is watching America, and America is watching TV.
  43. c# and Stdin/Stdout anyone? by Zo0ok · · Score: 3, Interesting

    Ok, this is actually a .NET issue, not really a c# issue.

    StandardInput and StandardOutput, in .NET, are text based streams, made up of 16-bit chars. When writing a (16-bit) char to StandardOutput it is converted to something else (UTF-8, maybe).

    Piping binary data from one app to another is a very non-trivial task.

    These are the small "features" that make c# unsuitable for anyone "thinking UNIX". Of course piping through stdout/stdin is not needed: you can use remoting, sockets or whatever - but those make easy things hard.

    Anyone who has written a c# program that uses stdin/stdout for binary data?

    BTW, you definately does not need Visual Studio to program .NET, vim + .NET framework and the online MSDN reference is completely sufficient.

    1. Re:c# and Stdin/Stdout anyone? by GroovBird · · Score: 3, Informative

      You are misinformed.

      The Console class has indeed two properties: In and Out that are respectively TextReader and TextWriter objects, but there are also the OpenStandardInput and OpenStandardOutput methods that will return you a nice Stream that you can then write directly to (using byte arrays, for example).

      And this is all easily done using command line compilers included with the SDK, or in Mono.

      See, that wasn't too hard?

      Dave

  44. Re:Summary of changes: not much new by TummyX · · Score: 2, Informative
    You forgot iterators which let you define more declarative how an enumerator/iterator works.

    IEnumerable<T> Test()
    {
    get
    {
    for (int i = 0; i < 10; i++)
    {
    yield i;
    }
    }
    }

    foreach (int i in Test())
    {
    Console.WriteLine(i);
    }

    1 is only in the spec stage here, whereas for Java there is already a technology preview, i.e. a more or less working implementation

    There has been a working implementation of generics for over a year now (for rotor).
  45. Re:Who gives a shit about the ECMA? by azaris · · Score: 5, Informative

    Who the hell is the ECMA?

    "Ecma International is an industry association founded in 1961, dedicated to the standardization of information and communication systems."

    Here is a list of their standards. It includes specs related to C, Ada, IDL, ECMAScript (JavaScript), C# and WSDL. Interestingly enough, Sun and Oracle are absent from their membership list.

    Why not an IETF standard?

    Hint: the "I" stands for Internet. What does C# have to do with the Internet?

  46. 'unsuitable for anyone "thinking UNIX"' by bani · · Score: 3, Interesting

    do you *really* think this design was an accident?

  47. Re:booooring by kryps · · Score: 3, Informative
    Java generics are broken because they don't guarantee type safety across compilation units. That requires VM changes, changes that Microsoft was willing to make but Sun wasn't.
    You don't know what you are talking about. The JSR 14 generics proposal offers compile-time type-safety while retaining compatibility with old (i.e. not generified) libraries. That means as long as you do not use "raw" types (e.g. Vector instead of Vector<String>) type safety is guaranteed and the compiler will emit a warning (and probably even an error in future versions) if it encounters usage of a raw type.

    -- kryps
  48. Generic generics? by dalleboy · · Score: 2, Informative

    After reading this I'll understand that C# generics really suck, big time, compared to C++ templates.

    The constraints are really a pain in the butt, as you must specify what interfaces that the 'generic' type must implement, and not what specific methods of the interfaces that the generic type must implement. What you say, you may think: But if I wanted any type that has a method named 'void Print()' to be executed by my generic class, all of those types must implement a named interface (IPrintable). That is perhaps OK if I have full control over the source code, but whatif I'm using a library written by someone else?

    If you don't specify a constraint the 'generic' type will effectivly be of type Object, and we all know how much we can do with the type Object. Hmm, let me think, oh yeah: ToString. No need for generics there.

    The examples in the spec are also mostly container class examples, wonder why? Perhaps that the generics of C# can't do anything but (or mostly) container (or container like) classes.

  49. Re:C# generics on built-in types do not use boxing by rnd() · · Score: 3, Informative

    In case anyone reading the parent didn't get it, that means that the C# implementation of generics will have a strong efficiency advantage over Java's b/c boxing/unboxing is a costly operation.

    --

    Amazing magic tricks

  50. Re:booooring by bwt · · Score: 2, Informative

    on some theoretical JIT, might actually run faster than a snail.

    You do know that java is faster than C# for non-GUI apps, right? source. I suspect that if you dump swing and go with the eclipse SWT, you probably equalize the GUI speed issue too, which would mean that on windows platforms Java is faster than C#.

    The "java is slow" reputation was earned with java 1.1 and was fixed long ago when the JIT VM's came out (they are part of all modern JVM's). Memory use issues might give you a real issue to knock java on, but you really shouldn't repeat untrue lore.

  51. Re:Who gives a shit about C# by sadiklis · · Score: 2, Insightful
    C# is ECMA standardized. Java is wholly owned by Sun.

    The biggest chunk of any language is it's vocabulary. In this case it's API.

    There are OSS J2EE projects (Jboss, Jonas, Jakarta's new project).

    And then there is this purely proprietary thing called MBF - Microsoft Business Framework.

    BTW to emphasise that the beef is in API, not language, let me remind you that .NET Framework can be programmed in many languages (C#, VB.NET, Managed C++, etc.).

    What other nearly-irrelevant subset of the beef is standartized by ECMA? Ones-and-zeores maybe? You know: "our systems are open, 'cause they are based on "ones-and-zeroes" standard" ;-)

    Anyway, ECMA seems to be almost a joke in terms of freedom of their standards: http://techupdate.zdnet.com/techupdate/stories/mai n/0,14179,2832719,00.html:

    But getting the stamp of approval from TC39 and the General Assembly doesn't mean that Microsoft is in any way ceding its ownership of C# and CLI. As part of the ECMA process, Microsoft, like any other company or organization seeking standardization of its technology, must make a declaration related to licensing the technology that complies with ECMA's Code of Conduct in Patent Matters. "The role of a standards body in this context is to warrant that licensing is possible on RAND (reasonable and non-discriminatory) conditions," explained van den Beld. So while Microsoft wouldn't be able to do whatever it wishes to C# itself, apparently the company would have plenty of latitude in terms of licensing.

    And it appears that ISO (C#/CLI are ISO standards too) is no better: http://www.imaging-resource.com/NEWS/1027527673.ht ml (JPEG no more?):

    'Register' article suggests the standards body may formally withdraw the JPEG standard altogether if Forgent continues with its patent claims...

    ISO rules require that its standards be implementable free, or under "reasonable and non-discriminatory" (RAND) terms.

    So what is a safer bet, OSS Java or .NET? Of course .NET, because it's closed and thus patent-torpedoes-invincible - can license patented technology, unlike all those open J2EE projects...

    I'm sure it's better to suffer proprietary lock-in than potentially-deadly patent threat. Right?

    Yet, even MS can be torpedoed successfully once in a while (e.g. that plugins patent hitting IE).


    Software world seems to be a mess with no clear future perspective.

    [Sorry for a somewhat-messy/offtopickish post.]

  52. Re:Who gives a shit about C# by gafter · · Score: 2, Insightful

    > C# is ECMA standardized. Java is wholly owned by Sun. Sun has repeatedly balked at standardizing Java due to the inherent loss of control.

    I suggest you write the following lists side-by-side:

    On the left, list the companies with members on the standards committe participating in defining the specification of upcoming versions of the Java language (JSRs 14, 175, 176 and 201). Count how many times each company appears on these lists, too.

    On the right, list the companies with members on the standards committe participating in defining the specification of upcoming versions of the C# language.