C# 2.0 Specs now available
-
The specs for C# 2.0 are now available on MSDN at http://msdn.microsoft.com/vcsharp/team/language/default.aspx There is a discussion forum for the language on the same page. Eric Gunnerson Visual C# Compiler PM
C# 2.0 Specs.[^] Thanks Eric, generics are going to be awesome. :)
-Nick Parker DeveloperNotes.com
-
At this point I like the partial classes and generics the most. I am sorry to say but I found the anonymous methods kinda Java'ish.. Maybe I'm going to like them later on, when we get to use this stuff :) The iterators i BIG fun, you could make a random sequence of numbers so you almost never know what item is returned by the foreach loop ;P I am looking forward to the new visual studio .net 2004, I hope it makes development even easier than it already is. Good luck Eric! Greetings.... :)
I think the anonymous delegates are somewhat a matter of taste, and should be used wisely ("If swelling persists, contact a professional programming practitioner immediately"...) There is the opportunity to make your code much more ugly, but there are also cases where you can make it much more local. If you want to be able to have a named iterator that can take some code, or you want to specify the MatchEvaluator for a Regex.Replace(), you can make your code more understandable (probably...) with an anonymous delegate. But I don't view them as a replacement for standard delegates.
-
The specs for C# 2.0 are now available on MSDN at http://msdn.microsoft.com/vcsharp/team/language/default.aspx There is a discussion forum for the language on the same page. Eric Gunnerson Visual C# Compiler PM
I should have noted that if you don't have Word, you can download the Word Viewer from: http://www.microsoft.com/downloads/details.aspx?FamilyID=9BBB9E60-E4F3-436D-A5A7-DA0E5431E5C1&displaylang=EN
-
The specs for C# 2.0 are now available on MSDN at http://msdn.microsoft.com/vcsharp/team/language/default.aspx There is a discussion forum for the language on the same page. Eric Gunnerson Visual C# Compiler PM
Good stuff. Partial classes - *cringes* Anonymous methods - useful but dangerous Iterators - cool Generics - SWEET! I was just thinking a couple of days ago how useful something like Generics would be. I'm still asking Santa Claus for default parameter specifiers though. Paul
-
Good stuff. Partial classes - *cringes* Anonymous methods - useful but dangerous Iterators - cool Generics - SWEET! I was just thinking a couple of days ago how useful something like Generics would be. I'm still asking Santa Claus for default parameter specifiers though. Paul
They should have added something like this too:
bool **MyClass.**MyMethod(string hello) { return hello == "hello"; }
at namespace level. This would allow u to group methods in logical groups and overcome some difficult design problems. leppie::AllocCPArticle("Zee blog");
Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it. -
I think the anonymous delegates are somewhat a matter of taste, and should be used wisely ("If swelling persists, contact a professional programming practitioner immediately"...) There is the opportunity to make your code much more ugly, but there are also cases where you can make it much more local. If you want to be able to have a named iterator that can take some code, or you want to specify the MatchEvaluator for a Regex.Replace(), you can make your code more understandable (probably...) with an anonymous delegate. But I don't view them as a replacement for standard delegates.
The improved locality is a win from a syntax and encapsulation perspective, but must more important to me is the fact that anonymous delegates have closures semantics. This opens up new programming idioms that are just not reasonable otherwise. Yay!! On the other hand, I pouted to see that 'yield' was specialized for iterators and not generalized into support for arbitrary coroutines. Then I winced a bit a 'yield return' replacing just 'yield'. I'd rather a little pain now with a new keyword/breaking change than an ugly syntax forever after. -Blake
-
Good stuff. Partial classes - *cringes* Anonymous methods - useful but dangerous Iterators - cool Generics - SWEET! I was just thinking a couple of days ago how useful something like Generics would be. I'm still asking Santa Claus for default parameter specifiers though. Paul
Why do partial classes make you cringe? I don't use generated code much, or at least not where it should be mixed with handwritten code, but it seems a big win for the majority who like code generating tools like form designers. *chuckles* As to anonymous methods being dangerous... mmm, but isn't that half the fun? -Blake
-
They should have added something like this too:
bool **MyClass.**MyMethod(string hello) { return hello == "hello"; }
at namespace level. This would allow u to group methods in logical groups and overcome some difficult design problems. leppie::AllocCPArticle("Zee blog");
Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.leppie, You are a sick, sick individual. :-D Paul
-
Why do partial classes make you cringe? I don't use generated code much, or at least not where it should be mixed with handwritten code, but it seems a big win for the majority who like code generating tools like form designers. *chuckles* As to anonymous methods being dangerous... mmm, but isn't that half the fun? -Blake
Blake Coverett wrote: mmm, but isn't that half the fun? Yeah, in some respects. I just worry about what some programmers I've had the misfortune to come across could do with such things available to them. Entire hunks of code in initialization routines, just because they can't be bothered to learn how to write a delegate; and classes broken down into hideous numbers of files so that you can never find anything (imagine a project full of controls where all the rendering is done in one file, all the keypress handling in another file, etc - some developers would actually find that logical). For anonymous methods, I could at least see a purpose. I couldn't for partial classes but then I very rarely use generated code, so that never crossed my mind. Now I suppose I have to cringe equally at both. Paul
-
They should have added something like this too:
bool **MyClass.**MyMethod(string hello) { return hello == "hello"; }
at namespace level. This would allow u to group methods in logical groups and overcome some difficult design problems. leppie::AllocCPArticle("Zee blog");
Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.Com to think of it, mate, isn't this one thing that partial classes can be used for? ie. rather than:
bool MyClass.MyMethod(string hello) { return hello == "hello"; }
dopublic partial class MyClass { bool MyMethod(string hello) { return hello == "hello"; } }
I'm really not sure I think this is a good idea, but it should be possible if there's an extremely good reason for it. Paul -
Com to think of it, mate, isn't this one thing that partial classes can be used for? ie. rather than:
bool MyClass.MyMethod(string hello) { return hello == "hello"; }
dopublic partial class MyClass { bool MyMethod(string hello) { return hello == "hello"; } }
I'm really not sure I think this is a good idea, but it should be possible if there's an extremely good reason for it. Paul -
Paul Riley wrote: I'm really not sure I think this is a good idea, I hate typing! leppie::AllocCPArticle("Zee blog");
Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.leppie wrote: I hate typing! Good. Maybe that'll discourage you from breaking up classes across multiple files. ;P Not that you actually have to type in VS.NET, it'll probably do it all for you. :) P Paul
-
The specs for C# 2.0 are now available on MSDN at http://msdn.microsoft.com/vcsharp/team/language/default.aspx There is a discussion forum for the language on the same page. Eric Gunnerson Visual C# Compiler PM
Anonymous classes, cool! I always loved anonymous event handlers in Java. But they have not fixed that
break;
stuff in theswitch
blocks. Fall-through or not, there's no reason for typing the same word under everycase
block. -
Anonymous classes, cool! I always loved anonymous event handlers in Java. But they have not fixed that
break;
stuff in theswitch
blocks. Fall-through or not, there's no reason for typing the same word under everycase
block.Ah but that would surely be a
break
ing change - think of all the sad programmers. -Blake