A
Alvin Bruney
C# is great but it does have some short comings. Here, I examine one of them
which I definitely think is a shortcoming.
Coming from C++, there seems to be no equivalent in C# to separate code
cleanly for the user's benefit. Why is this important? Because a user gets
to maintain this code, not a machine. C++ exposed us to header files which
was a way, among other things, to cleanly separate class implementation from
declaration. Why was this overlooked in C#? Mixing implementation and
declaration inside a class is so ugly. Yuck!
Sure intellisense can take you a long way, but it's a bandaid on a bruise.
Though it is possible to separate classes out into namespaces in C# you
still have to port the implementation with it. Yuck! A class can be
conceived without an implementation, if only for discussion purposes. You
are not always interested in the implementation, that is why it is so yucky.
What if you want to take the class function declarations with you to a
meeting to talk about your new class? This does actually happen quite
frequently. You can't do that in C# without intimately knowing the cut and
paste editor. Intellisense can't help you there. A class has meaning outside
of the canvas it was carved on. A class does exist outside of the visual
studio GUI. Do not forget, there is no intellisense at the command line.
Probably higher level UML tools in C# builder will fit the bill, but that's
not the point. It should be part of the language implementation because
developers get to maintain that code. It's even more troublesome if these
UML solutions are not included in the box.
We've all gotten used to this mess, and if you come from Java, you've always
had it so it seems odd to be without it. But it doesn't make it right. There
is (make that was) a better way. I remember that time when when
implementation and declaration were different beasts. Sure the compiler
could care less if the implementation was on the moon and declaration on
mars, but then again, a machine does not usually get to maintain code right?
So it was never about the machine. It's about making life easy for
developers. C# has failed in this regard. A more difficult life maintaining
code means less productivity. Yes, it does make me less productive if I need
to figure out the moving parts of a class.
I feel better now after venting.
which I definitely think is a shortcoming.
Coming from C++, there seems to be no equivalent in C# to separate code
cleanly for the user's benefit. Why is this important? Because a user gets
to maintain this code, not a machine. C++ exposed us to header files which
was a way, among other things, to cleanly separate class implementation from
declaration. Why was this overlooked in C#? Mixing implementation and
declaration inside a class is so ugly. Yuck!
Sure intellisense can take you a long way, but it's a bandaid on a bruise.
Though it is possible to separate classes out into namespaces in C# you
still have to port the implementation with it. Yuck! A class can be
conceived without an implementation, if only for discussion purposes. You
are not always interested in the implementation, that is why it is so yucky.
What if you want to take the class function declarations with you to a
meeting to talk about your new class? This does actually happen quite
frequently. You can't do that in C# without intimately knowing the cut and
paste editor. Intellisense can't help you there. A class has meaning outside
of the canvas it was carved on. A class does exist outside of the visual
studio GUI. Do not forget, there is no intellisense at the command line.
Probably higher level UML tools in C# builder will fit the bill, but that's
not the point. It should be part of the language implementation because
developers get to maintain that code. It's even more troublesome if these
UML solutions are not included in the box.
We've all gotten used to this mess, and if you come from Java, you've always
had it so it seems odd to be without it. But it doesn't make it right. There
is (make that was) a better way. I remember that time when when
implementation and declaration were different beasts. Sure the compiler
could care less if the implementation was on the moon and declaration on
mars, but then again, a machine does not usually get to maintain code right?
So it was never about the machine. It's about making life easy for
developers. C# has failed in this regard. A more difficult life maintaining
code means less productivity. Yes, it does make me less productive if I need
to figure out the moving parts of a class.
I feel better now after venting.