To be honest I have yet to try a beta of Version 2 of C#/VB, but I have been reading about C# 2.0 and it scares me.
It seems to me that the elegance of VB.Net/C# lies in simplicity. Both languages are particularly easy to use and at the same time very powerful and flexible. But now we introduce generics, partials, and nullable types. If we continue to load these "nifty features" onto the .Net Framework/C# it won't be long before we might as well be using Managed C++.
Separating designer generated code from hand written code sounds great, but it is hardly necessary; it is already collapsed into a single line in the code editor. And I can see potential there to confuse a new programmer who never had to define a class in a single file. Form1.Designer.cs will be like this mysterious black box that creates your form for you. You will never look at it, and you will be unable to create your own form by hand because you have never been exposed to that kind of code. Just like the good ol VB6 days. I personally have run into a handful of situations where I had to hand-tweak designer generated code (mainly code for forms that contain a control that I am developing). Will the possibility of doing so even occur to someone who hasn't used C# 1.x?
Nullable types do not provide any new functionality. Instances where you need them are not that common, and surely a programmer can handle declaring their own boolean to tell them if a variable holds a meaningful value. Then, nullables add confusion in certain circumstances, like boxed nullable value types, where we can have a null reference, a null value, or a normal value.
And generics? Well, they seem nifty, I suppose. Sure, they are flexible, but I certainly wouldn't say that they are necessary.
I have yet to run into a situation where I could not make a program do what I needed it to without one of these new features. If I don't like them, don't have to use them, though, right? But the entire programming community will be and I will not be able to operate as a programmer without reasonable familiarity with these features. I will be using other people's code with these features in them. When I ask "How do I...?" on the XTreme .Net forums, someone will say "Oh, just make a generic that..." Avoiding these new features is possible but not practical.
I like nice things, but I'm not big on gadgets. These new features strike me as little more than unnecessary gadgets. More ways to do the same thing. Sure, sometimes they will provide a better way, but you have to draw the line at some point; you cannot have infinitude of program features so that every task can be performed using the absolute best method (at that point we might as well be writing in assembly). I personally draw the line at .Net version 1.1. That doesn't leave much room for improvement, but maintains the simplicity that makes .Net as great as it is. To be frank, I don't see a need for improvement in the CLR. Maybe some new classes and changes in existing classes would be nice, but beyond that I don't see VB/C# 1.1 as lacking in any way.
All that said, I can't really see with great certainty what kind of impact these new features will have on .Net programming until I see them in action, and I do plan on buying C#.Net 2005.
It seems to me that the elegance of VB.Net/C# lies in simplicity. Both languages are particularly easy to use and at the same time very powerful and flexible. But now we introduce generics, partials, and nullable types. If we continue to load these "nifty features" onto the .Net Framework/C# it won't be long before we might as well be using Managed C++.
Separating designer generated code from hand written code sounds great, but it is hardly necessary; it is already collapsed into a single line in the code editor. And I can see potential there to confuse a new programmer who never had to define a class in a single file. Form1.Designer.cs will be like this mysterious black box that creates your form for you. You will never look at it, and you will be unable to create your own form by hand because you have never been exposed to that kind of code. Just like the good ol VB6 days. I personally have run into a handful of situations where I had to hand-tweak designer generated code (mainly code for forms that contain a control that I am developing). Will the possibility of doing so even occur to someone who hasn't used C# 1.x?
Nullable types do not provide any new functionality. Instances where you need them are not that common, and surely a programmer can handle declaring their own boolean to tell them if a variable holds a meaningful value. Then, nullables add confusion in certain circumstances, like boxed nullable value types, where we can have a null reference, a null value, or a normal value.
Visual Basic:
void NullableConfusion() {
int? X = null;
if (ConfuseMe(X))
MessageBox.Show("Was X a null reference or a null integer?");
}
bool ConfuseMe(Object Nullster) {
return (Nullster == null);
//Does this perform the == operator on Nullster as an Object or a nullable int?
}
And generics? Well, they seem nifty, I suppose. Sure, they are flexible, but I certainly wouldn't say that they are necessary.
I have yet to run into a situation where I could not make a program do what I needed it to without one of these new features. If I don't like them, don't have to use them, though, right? But the entire programming community will be and I will not be able to operate as a programmer without reasonable familiarity with these features. I will be using other people's code with these features in them. When I ask "How do I...?" on the XTreme .Net forums, someone will say "Oh, just make a generic that..." Avoiding these new features is possible but not practical.
I like nice things, but I'm not big on gadgets. These new features strike me as little more than unnecessary gadgets. More ways to do the same thing. Sure, sometimes they will provide a better way, but you have to draw the line at some point; you cannot have infinitude of program features so that every task can be performed using the absolute best method (at that point we might as well be writing in assembly). I personally draw the line at .Net version 1.1. That doesn't leave much room for improvement, but maintains the simplicity that makes .Net as great as it is. To be frank, I don't see a need for improvement in the CLR. Maybe some new classes and changes in existing classes would be nice, but beyond that I don't see VB/C# 1.1 as lacking in any way.
All that said, I can't really see with great certainty what kind of impact these new features will have on .Net programming until I see them in action, and I do plan on buying C#.Net 2005.