I've recently taken my first step into C# and .NET. Yes, it's been available for four years. No, I don't have any particularly good reason to start now, just a lot of free time.
I picked up a couple of books and some software at Half-Price Computer Books on Seymour in Vancouver. Yes, that's a plug -- they're a great place to get things that they have.
I'm not yet prepared to offer opinions on the books I got, but I have a couple of initial thoughts about C# and .NET together.
- C# is C++ with a shorter rope (as is Java, BTW), but there are some weirdnesses in it. Why do they still use break; in switch statements, for instance (there is no fallthrough)? And why make the class-struct distinction be heap vs. stack? I must say that I've never appreciated the fascination some people have with being able to distinguish between objects on the stack and objects on the heap -- I prefer to write code that doesn't care, and if I get to the point where I do care, it's time to re-think what I'm doing.
- Visual Studio .NET is a nice development environment (based, I must admit, on a couple of very small projects). It ranks up there with Borland's C++ Builder. Of course, C++ Builder has been available for considerably longer, but it's still nice to see Microsoft producing a world-class development environment again (or finally, depending upon your point of view).
- .NET imposes an enormous overhead on very small programs. I wrote a small stopwatch application (I needed to time some lines), and it occupies 8 MB of memory space (and that's according to the .NET perfmon -- TaskManager says it occupies 23 MB!), which seems like a lot. OTOH, I wrote it in about 25 minutes, and I don't need it to be smaller than it is, I needed it right now. I guess optimization for size really is a lost art, eh?
As I said a long time ago, this is the kind of tool that can actually make programming Windows fun, which is no small feat.
Comments