C# 2.0 Spec Released 634
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."
gc#? (Score:2, Insightful)
Re:gc#? (Score:2, Insightful)
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.
Re:gc#? (Score:3, Funny)
actually i would doubt it
Re:gc#? (Score:5, Informative)
Re:gc#? (Score:4, Insightful)
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.
ugh (Score:2)
At our school C# is an elective.
Re:ugh (Score:4, 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++:
Or...
These examples were shamelessly ripped from Bjarne's FAQ, which is available Here. [att.com]
Code name (Score:5, Informative)
Re:Code name (Score:3, Informative)
still not even a compiler warning.. *sigh*
Re:Code name (Score:2)
Cheap update (Score:2)
The cheap update deal expired at the end of September IIRC, at least here in the UK. It was being featured fairly prominently on the MS web site and doesn't appear to be there now, so presumably it's gone elsewhere as well.
moving towards bloatware or are these important? (Score:2, Insightful)
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?
Re:moving towards bloatware or are these important (Score:2, Interesting)
Bill
Re:moving towards bloatware or are these important (Score:4, Informative)
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
Not quite the same thing. (Score:4, 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.
Re:moving towards bloatware or are these important (Score:2)
Yup. Java does this. It is called "deprecated". For instance parts of the Date class have methods which are deprecated. The method's functionality has been moved to the Calendar class.
It still works, but the compiler gives you a warning.
follow the link (Score:2, Funny)
Seems like a pretty limited spec.
All it says is:
Plugger: No approperiate application for type application/msword found!
whatever...
Code Name (Score:3, Insightful)
Why C# doesn't Totally Suck (Score:5, Interesting)
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
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.)
Re:Why C# doesn't Totally Suck (Score:5, 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* ;)
It's already there in Java 1.5 (Score:5, Informative)
Re:It's already there in Java 1.5 (Score:2, Flamebait)
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.
Re:Why C# doesn't Totally Suck (Score:3, Interesting)
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.
Ask a stupid programmer.... (Score:3, Insightful)
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 error
Re:Ask a stupid programmer.... (Score:2)
Re:Ask a stupid programmer.... (Score:3, Insightful)
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 be
Re:Ask a stupid programmer.... (Score:3, Insightful)
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. Der
innovation (Score:3, Insightful)
Re:innovation (Score:2)
more info (Score:4, Informative)
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/producti
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.
Re:more info (Score:2)
If you cannot turn it off choice two is the obvious answer!
the kitchen sink too? (Score:3, 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
Re:the kitchen sink too? (Score:3, Funny)
booooring (Score:2)
It's good to see commercial competition adding new features to commercial languages, although I hope they don't get so feature bloated they become like Perl.
Re:booooring (Score:4, 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.
Re:booooring (Score:4, Informative)
-- kryps
Re:booooring (Score:3, Informative)
You do know that java is faster than C# for non-GUI apps, right? source [dada.perl.it]. 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
C# generics on built-in types do not use boxing... (Score:5, Interesting)
"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.
Re:C# generics on built-in types do not use boxing (Score:4, Informative)
c# and Stdin/Stdout anyone? (Score:4, Interesting)
StandardInput and StandardOutput, in
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
'unsuitable for anyone "thinking UNIX"' (Score:4, Interesting)
Re:c# and Stdin/Stdout anyone? (Score:4, Informative)
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
Re:Whidbey? (Score:2, Informative)
Re:Whidbey? (Score:2)
Re:That's great (Score:2)
Re:That's great (Score:2, Insightful)
Re:That's great (Score:2)
But you don't have to use
Re:That's great (Score:2)
Oh wait... [madtasty.com]
Re:Who gives a shit about C# (Score:4, Insightful)
Perhaps there are potential submarine patents, but Java is absolutely vendor-tied while C# is at least relatively open.
Re:Who gives a shit about C# (Score:3, Funny)
BWhahahaha, you fell for that, huh? Propaganda makes trolls all over the world.
Who gives a shit about the ECMA? (Score:2)
Look at thier site.
Aparently people cannot be members, only companies and universities (non-profit companies)
Why not an IETF [ietf.org] standard?
They've served very well so far.
Sun has repeatedly balked at standardizing Java due to the inherent loss of control.
I was pretty sure that Sun had published a Java standard. How is a standards org comprised of Micriosoft and it's vassals any better? I was under the impression that the only company that had problems with the Java standard was
Re:Who gives a shit about the ECMA? (Score:4, Insightful)
Of course not.
But those who don't remember history are doomed to repeat it.
Re:Who gives a shit about the ECMA? (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 [ecma-international.org] 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?
Re:Who gives a shit about C# (Score:3, Informative)
Ruby Continuations (Score:3, Informative)
-----
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.
Re:Ruby Continuations (Score:2)
Re:Ruby Continuations (Score:4, 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.
Continuations are very useful in AI (Score:2)
Continuations are very useful in AI; often they are the only clean way of implementing a "hold that thought", which comes up very frequently in (for example) natural language processing. If you are trying to evaluate a sentence "as the words are coming in" by building a semantic structure that represents the meaning so far, you generally will want to be able to rearrange the semantic fragments based on later information. For example, if asked to name "the tallest person you know" vs. "the tallest person
informative (Score:2)
Perl 6 will have continuations (Score:3, Informative)
http://www.sidhe.org/~dan/blog/archives/000156.
Re:Does C# have continuations? (Score:5, Informative)
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.
Re:Does C# have continuations? (Score:4, Informative)
Re:Does C# have continuations? (Score:2)
Re:Does C# have continuations? (Score:2)
When I was writing in Scheme (back in 1986,) I found myself using call/cc quite often. In CL, I rarely find myself missing continuations, perhaps because the hairy parts of my code don't use defun, but rather use m
Re:Does adding every ingredient make it better? (Score:5, Insightful)
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.
Re:Does adding every ingredient make it better? (Score:2)
Re:Does adding every ingredient make it better? (Score:2)
No, he was right the first time. It's undefined behaviour, which is pretty much always broken.
Sorry, couldn't resist.
Re:Does adding every ingredient make it better? (Score:2)
C++ - C-- == 0
I doubt it. Try running this:
int C;
printf("%d\n", C++ - C--);
I don't have a compiler on this machine, but I'll wager 10 to 1 the above code will print "-1". (At least if you run it on gcc.)
-a
Re:Does adding every ingredient make it better? (Score:4, Insightful)
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.
Re:Does adding every ingredient make it better? (Score:5, Insightful)
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.
Re:Does adding every ingredient make it better? (Score:2)
HAH
Re:Does adding every ingredient make it better? (Score:2)
What do you mean by broken? Broken implies to me "not working," and last I checked, both of those languages work predictably.
Complicated is mostly opinion-based, so I'd love you know what "not complicated" languages you're comparing them to.
Re:Does adding every ingredient make it better? (Score:4, Insightful)
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.
Re:Does adding every ingredient make it better? (Score:2, Informative)
Not true. Check out University of Waterloo [uwaterloo.ca] as an example of Microsofts approach to exposing C# to a new generation of developers. Well, engineer's, but close enough. ;-)
Re:Does adding every ingredient make it better? (Score:2)
Seriously, aside from the occasional muttering about "algorithmic complexity," I think most of my courses have focused entirely on the language being used. The system is boke. It would take a few million in grant money just to get the 'r' installed.
Re:Does adding every ingredient make it better? (Score:4, Insightful)
Is such a high level language such as one that is designed to run upon other protocals the same?
No.
Re:Does adding every ingredient make it better? (Score:2)
At first glance, this seemed like a troll. But then I got to thinking... you never know. It could be a plot by Microsoft to soak up all the time of programmers, so they don't have time for PHP & MySQL love.
No, but (Score:2)
Re:Does adding every ingredient make it better? (Score:2)
The good: Perl
The bad: C#
The ugly: PL/1
-transiit
Re:Sea Number/Sea Sharp (Score:3, Funny)
Re:Sea Number/Sea Sharp (Score:5, Funny)
Or as Microsoft execs like to pronounce it amongst themselves, cash.
Re:Sea Number/Sea Sharp (Score:4, Interesting)
The octothorpe symbol, '#', has slanted vertical strokes. The "sharp" sign has slanted horizontal strokes.
Re:Sea Number/Sea Sharp (Score:2, Offtopic)
don't you read telephone manuals!? (Score:3, Interesting)
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.
Re:Sea Number/Sea Sharp (Score:3, Funny)
Re:More C++ (Score:2)
Neither are C++ templates.
Re:VB Programmers (Score:2)
You're missing the point; the new VB.NET spec will be out just as soon as the search-and-replace has finished.
Re:VB Programmers (Score:2)
Re:VB Programmers (Score:2)
For someone who has absolutely no clue what a programming language is, or how applications are developed, seeking out t
Re:Why should I care? (Score:5, Informative)
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.
Re:Why should I care? (Score:2)
Prolog, Pascal, and Pike?
Re:Why should I care? (Score:3, Insightful)
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
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.
Re:Why should I care? (Score:3, Interesting)
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 misgui
Re:Why should I care? (Score:2)
Re:Why should I care? (Score:2, Informative)
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
Re:Why should I care? (Score:3, Informative)
I'm in web development ( full microsoft environment ) using C#, SqlServer2000, WinXP
Pros:
Re:this is fantastic (Score:2)
If you were not who you were, you would me modded down faster then you can say goatse. hehe
But seriously I am installing the c# learning edition now and plan to install your mono on FreeBSD4.8 or 4.9 if the rumors are true that Fbsd 4.9 will be done this monday!
I use to hate Microsoft with a passion. Their products use to suck until quite recently. The win32 api is quite nasty compared to gtk+ but with
What worries me is api closeness. Yes Mono the last time I liked supp
Re:this is fantastic (Score:2)
Oh great, so where can I download the specs for the MS document formats, the Windows
Parent is NOT Miguel de Icaza (Score:2)
This is Miguel de Icaza? I don't think so. Look for miguel [slashdot.org].
Re:Summary of changes: not much new (Score:3, Informative)
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).