.NET 1.x Is Why We Can't Have Nice Things Reason #32
-
I've heard that .Net is largely inspired by Java. If the first version of .Net did not have generics, then perhaps Java also did not have generics at that time. How is Java managing its deprecation of features?
Poorly
-
Because 1.x existed prior to generics we have issues of legacy object models not implementing
IList<T>
and instead simply exposing hard typed indexer properties. Normally, you'd just get the generic parameters of the genericIEnumerable<T>
interface, but because some object trees were created prior to 2.0 - like the CodeDOM they don't have them. This makes determining the element type of a typed list extremely difficult. The problem is that your alternative is the indexer property which isn't a member of a hard interface, so you have to select the appropriate indexer property from the properties on that type. There might bethis[string name]
in there too, for example. There is no contract however, so there are no guarantees. This isn't especially robust. Which means, the obvious solution is to first try to get it using the generic interfaces, and if they aren't available, then we fall back to the less robust method above. This is not ideal, and it requires maybe a page of code to handle all the scenarios. Microsoft didn't put generics into 1.x I think because of time constraints, and if so they should have waited, IMO. Edit: For anyone interested I just posted a tip that solves this problem. How To Get A Collection Element Type Using Reflection in C#[^]Real programmers use butterflies
-
Do you mean there are three argument Exceptions (which I can understand) or that message and paramName are switched in two of them? :~
Best, Sander sanderrossel.com Migrating Applications to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly
The inconsistency in parameter order.
-
Wow, whining about something that was given away for free. Remember, you have never needed Visual Studio to compile a dotNet project. VS just made it easier.
I never said otherwise. Why are you even responding?
Real programmers use butterflies
-
honey the codewitch wrote:
Microsoft didn't put generics into 1.x I think because of time constraints, and if so they should have waited, IMO.
IIRC they couldn't wait because they'd lost the lawsuit with Sun over J++; and needed to get a nominal replacement stack out asap.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
Oh yeah - i worked there during that mess.
Real programmers use butterflies
-
Oh yeah - i worked there during that mess.
Real programmers use butterflies
At MS or at Sun? Either way, do you have any stories to share from the inside?
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
-
At MS or at Sun? Either way, do you have any stories to share from the inside?
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
Sorry, I was at Microsoft. For the record, I was glad Sun was suing over Java, and I'm glad MS dropped Visual J++ because it was garbage.
Real programmers use butterflies
-
I've heard that .Net is largely inspired by Java. If the first version of .Net did not have generics, then perhaps Java also did not have generics at that time. How is Java managing its deprecation of features?
J2SE 5.0 (2004)
-
.net++ That'd be .neu (new in German)!
Robust Services Core | Software Techniques for Lemmings | Articles
.not
-
I've heard that .Net is largely inspired by Java. If the first version of .Net did not have generics, then perhaps Java also did not have generics at that time. How is Java managing its deprecation of features?
As I recall, .NET got generics somewhat before Java. (More than a year? I don't recall exactly).