[quoted text, click to view] > And it's kind of sad when this formerly beautiful young woman C# has been
> is
> "improved" with a third specialized arm sticking awkwardly out of her
> back.
Well, I haven't looked very extensively at C# 3.0, but I have been working
with C# 2.0 for awhile now, and the extensions added to the language
actually make it easier to use, and not the other way around.
Take Generics, for example. Generics allow a single class or method
definition to accomodate any data type while maintaining strong data typing,
and without casting or conversion. One excellent example is the
System.Collections.ObjectModel.Collection<T> class, which is a Generic
Collection that can be used as a Collection of any data type whatsoever. It
requires no casting or conversion, as do previous versions of Collections
which were of type Object. And it is strongly typed to the type you pass to
it when declaring it. The possible ramifications of Generics have yet to be
fully exploited. I have personally, for example, extended the
System.Collections.Generic.Dictionary<TKey,TValue> by creating my own
GenericDictionaryCollection<TValue>, which always uses a string Key, but any
type of value, from that, a StringDictionaryCollection which always uses a
string as the Key and the Value, added events and event handlers to it which
can be used by derived classes for validating strings, and derived several
StringDictionaryCollections from it for use with Custom Configuration
Classes. Each of the custom StringDictionaryCollection derived classes
validates the strings entered into it in their own way. I create methods
which operate on a StringDictionaryCollection, and can use them for any of
the derived classes.
Another example is Anonymous methods. This enables the developer to, for
example, declare an Event Handler without having to create a delegate method
separately, but simply by putting in a block of statements. When an Event
Handler is used only once in the code, this simplifies the code, rather than
making it more complex.
In both of these examples, the language has been improved by allowing
developers to write and maintain less code. In essence, it allows developers
to write leaner, more concise (and less complex) code, and the larger the
project, the more beneficial this is. From what I've gleaned about C# 3.0 so
far, this trend continues in the new language enhancements.
Still, again, one can continue to use the older methodology without any
problems, if one so chooses. As for me, I like to "hang ten" with the new
stuff; call me a technological thrill-seeker. Yes, you do a bit of bleeding
on the cutting edge, but what a view!
--
;-),
Kevin Spencer
Microsoft MVP
..Net Developer
I'd rather be a hammer than a nail.
[quoted text, click to view] "Alf P. Steinbach" <alfps@start.no> wrote in message
news:4332b674.993130546@news.individual.net...
>* Kevin Spencer:
>> [excessive quoting removed]
>>
>> * Alf P. Steinbach:
>> >
>> > Now you featuritis-ridden guys have taken over. And you don't seem to
>> > understand one iota of the general idea. Or if you do, you don't give
>> > a
>> > damn.
>>
>> [snipped babble]
>>
>> To extend something is quite a different concept than making it more
>> complex.
>
> Adding features to a language is never a simple extension where the former
> version can be used just as it was. To take your own example, C++ is not
> a
> proper superset -- extension -- of C. Any C program can be re-coded
> as
> valid "better C" C++, but give a non-C++ cognizant C coder a pure C++
> compiler
> and s/he will soon be struggling with constructs that "should" compile (as
> C)
> but don't (as C++), constructs that don't do what they "should" (as C) but
> something very different (as C++), compiler options that make no sense
> whatsoever to her, and when s/he has to use code written by others, or
> generated by tools, s/he will find it entirely indecipherable, not only
> syntactically, but it's expressed in terms of concepts not existing in C.
>
> And that's for a set of language extensions that have gone through a very
> extensive review process where only the very fittest survived.
>
> For C# it's now different.
>
> And it's kind of sad when this formerly beautiful young woman C# has been
> is
> "improved" with a third specialized arm sticking awkwardly out of her
> back.
>
> All to make her better adapted to one small set of specific tasks.
>
>
>> [snipped suite of personal attacks, leaving just one]
>>
>> Like the
>> Amish, you have chosen where in the chain of increasing technological
>> complexity you wish to live, and it is neither at the bottom, nor at the
>> top.
>
> Nothing I can say can refute that convincing an argument...
>
> --
> A: Because it messes up the order in which people normally read text.
> Q: Why is it such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing on usenet and in e-mail?