Kevin Cline said:
"Eric Gunnerson [MS]" <
[email protected]> wrote in message
We're considering adding some friend support in Whidbey.
Of all the things that C# needs, friend is not one of them. Support
Quite agreed. It was annoying in C++ and would just bug me in C#. To easy to
abuse and too many people who would abuse it, its not worth the maybe 1 in
every 30,000 cases where it would be of any value whatsoever.
for
real generic programming, with partial specialization, non-type
arguments, and implicit function instantiation would be useful.
Support for RAII that does not require 20 lines of
Dispose-GC.SuppressFinalization boilerplate would be nice. Some
support for functional programming would be very useful. Some
general-purpose container algorithms ala the C++ STL would help a lot.
Moving from C++ to C#, I feel like my nice drawerful of tools was
taken away and I was handed a box of crayons and a pair of plastic
blunt-tip scissors.
But it also took away that running chainsaw you were always risking sitting
on. One thing I really worry about is the formation of an STL equivilent.
Templates in C++ were not pleasent and often drove me crazy. I don't know
how many times a template failed to work for whatever reason, issuing a
massive number of compile time errors that I couldn't hope to handle. It
would, eventually, cause me to waste a huge amount of time trying to figure
out why a) If wizards couldn't pump out correct, predesigned code, how the
hell was I supposed to, and b) Why, exactly, did this class need 80000 lines
of code to print to the console.
You lost some tools, yes, but you also gained a much cleaner universe to
work in. Remember that when it comes down to it, clean, simple, easy code
should ALWAYS rule in C#. Anything, like full on templates, that begins to
complicate code and make it a chore to use will destroy the language. C#
does not need to be C++, should not be C++, and if it ever becomes C++ I'm
going to Java(or maybe Eiffel) and I doubt I'd be the only one.
I would also suspect that you would also find alot of the tools you feel are
missing if you actually give up C++ and think in C#. The languages are
different and you should never work in one in the way you would work in the
other. If you feel you need the STL, you are quite welcome to use C++, it
exists in the managed world too.
Now, that my rant is over, some of hte features you mentioned would be nice.
Partial specialization, for example. However, RAII shouldn't be used in C#,
other patterns, IDisposable for example, exist instead.
Functional programming features would be nice, at times, but I do not think
it is a nessecity. I do wish however that instead of iterators, we were
getting full-fledged coroutines. Best I can tell the yield keyword will
exist only in interator code.