I came back a couple of days ago from a week's training near Reading with a couple of colleagues including qidane. The course was a "bootcamp" for .NET development in C# or Visual Basic. We have a preference for C
( Read more... )
Re: C# or not C#, that is the questionggreigOctober 7 2004, 20:49:28 UTC
Coming from C++, C# feels fairly natural. If you're coming from C, then I guess you would have to get used to putting things in classes, but I would think that is something worth learning anyway.
Assuming you'll be using Visual Studio, I also think that the learning curve may not be as great as you fear. While C# feels a lot like C++, it has quite a number of the more esoteric bits ironed out and doesn't come with too many new oddities of its own. Probably most importantly though, if you're learning, the IntelliSense in Visual Studio is pretty good and the BCL (Base Class Library) is so well structured that a lot of the time you can guess at what you're looking for and rely on IntelliSense to tell you whether you're heading in the right direction. You can also document your own code using XML comments which will appear in the IntelliSense - really rather useful in a big project!
I don't know how rich the APIs or other libraries are in the particular directions you want to go with it, but would think it would be worth investigating. Learning any new language will be a bit slow at first, but I think this would be a relatively easy one for you to pick up with significant productivity benefits in the slightly longer term.
I think there are three significant new oddities to get used to - properties, attributes and delegates. Properties help in the encapsulation of class data members (called fields in C#) by providing an additional layer between them and the outside world. Attributes can be used to quickly add standard functionality to classes to functions without having to write all the code yourself, and delegates are a lot like function pointers in C++. Delegates have a slightly confusing syntax - I think that's probably unavoidable in dealing with something like a function pointer - but they are important for the .NET model of how to handle events, so you should struggle over the bump with them. I expect they will become second nature in time.
If you have used templates or the STL in C++, C# is getting some similar functionality next year in the form of a significant feature called "generics". If you have used templates and the STL, then generics are something to look forward to - if not, don't worry about them now.
If I were you, I would be inclined to give it a try. The only thing that gives me pause is whether you can expect reasonable support for your particular lines of development. I would do a bit more checking into what kind of support you can expect there before making a decision, but as for the language itself - I think it's a good way to go.
Oh, just one thing more - although .NET does have a lot of Internet functionality in it and people tend to focus on that a lot, it's perfectly good for writing non-Internet focussed apps too.
If you need to, it's supposed to be easy to use other languages within a .NET project, so if you wanted to write number-crunching in C++ and the user interface in C#, that should be possible - perhaps even easy! At the moment, they would have to be in separate executables or libraries within a solution, but as of next year it is even supposed to be possible to mix languages within a single DLL or EXE.
Assuming you'll be using Visual Studio, I also think that the learning curve may not be as great as you fear. While C# feels a lot like C++, it has quite a number of the more esoteric bits ironed out and doesn't come with too many new oddities of its own. Probably most importantly though, if you're learning, the IntelliSense in Visual Studio is pretty good and the BCL (Base Class Library) is so well structured that a lot of the time you can guess at what you're looking for and rely on IntelliSense to tell you whether you're heading in the right direction. You can also document your own code using XML comments which will appear in the IntelliSense - really rather useful in a big project!
I don't know how rich the APIs or other libraries are in the particular directions you want to go with it, but would think it would be worth investigating. Learning any new language will be a bit slow at first, but I think this would be a relatively easy one for you to pick up with significant productivity benefits in the slightly longer term.
I think there are three significant new oddities to get used to - properties, attributes and delegates. Properties help in the encapsulation of class data members (called fields in C#) by providing an additional layer between them and the outside world. Attributes can be used to quickly add standard functionality to classes to functions without having to write all the code yourself, and delegates are a lot like function pointers in C++. Delegates have a slightly confusing syntax - I think that's probably unavoidable in dealing with something like a function pointer - but they are important for the .NET model of how to handle events, so you should struggle over the bump with them. I expect they will become second nature in time.
If you have used templates or the STL in C++, C# is getting some similar functionality next year in the form of a significant feature called "generics". If you have used templates and the STL, then generics are something to look forward to - if not, don't worry about them now.
If I were you, I would be inclined to give it a try. The only thing that gives me pause is whether you can expect reasonable support for your particular lines of development. I would do a bit more checking into what kind of support you can expect there before making a decision, but as for the language itself - I think it's a good way to go.
Oh, just one thing more - although .NET does have a lot of Internet functionality in it and people tend to focus on that a lot, it's perfectly good for writing non-Internet focussed apps too.
If you need to, it's supposed to be easy to use other languages within a .NET project, so if you wanted to write number-crunching in C++ and the user interface in C#, that should be possible - perhaps even easy! At the moment, they would have to be in separate executables or libraries within a solution, but as of next year it is even supposed to be possible to mix languages within a single DLL or EXE.
Reply
Leave a comment