Whoever decided to release C# 1.0 without generics...
-
... should be sentenced to spend their life fixing errors caused by downcasting from System.Object to concrete types when using non-generic collections.
-
... should be sentenced to spend their life fixing errors caused by downcasting from System.Object to concrete types when using non-generic collections.
If at first you don't succeed, refactor.
Software Zen:
delete this;
-
... should be sentenced to spend their life fixing errors caused by downcasting from System.Object to concrete types when using non-generic collections.
My number one reason that C# 1.0 was half baked. And, there's still people using those non generic containers.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
My number one reason that C# 1.0 was half baked. And, there's still people using those non generic containers.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Look guys he's ALIVEEEEEE!
-
My number one reason that C# 1.0 was half baked. And, there's still people using those non generic containers.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Alright - who are you and what have you done with the real Christian :suss:
-
My number one reason that C# 1.0 was half baked. And, there's still people using those non generic containers.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Hey CG! How the devil are you?
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre Have a bit more patience with newbies. Of course some of them act dumb -- they're often *students*, for heaven's sake. -- (Terry Pratchett, alt.fan.pratchett)
-
... should be sentenced to spend their life fixing errors caused by downcasting from System.Object to concrete types when using non-generic collections.
So you were the one who knows the right magic words for summoning Christian! What took you so long to cast the spell?
There is only one Ashley Judd and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
-
... should be sentenced to spend their life fixing errors caused by downcasting from System.Object to concrete types when using non-generic collections.
Generics are for academics only, much too complicated for normal programmers. And casts work just fine, right? That was the view of the C# and CLR teams. Generics weren't "left out" of .NET 1.0; they weren't planned for. And they almost didn't make it into .NET 2.0. Apparently, generics had low priority compared with features like being able to run the CLR inside SQL Server... See here for background info: .NET/C# Generics History (Don Syme's blog)[^]
-
... should be sentenced to spend their life fixing errors caused by downcasting from System.Object to concrete types when using non-generic collections.
One thing that sucks is that, if generics were in .NET 1, there would be literally THOUSANDS of fewer types in the .NET framework. You could get rid of almost every delegate type; since all you really need are
Action<T>
andFunc<T>
and their overloads. Had we had generics in .NET 1, we wouldn't need events and EventArgs types, we could just useSystem.IObservable<T>
for the whole thing. So many things would have been better if they built in generics from the start. But, we're Monday Morning Quarterbacking here; hindsight is 20-20, and all that. I think Microsoft realizes the importance of generics now, but didn't then. And let's not pretend we all knew it was important. I remember thinking it was cool, but wasn't sure how useful it'd be. Turns out, pretty damn useful.Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon
Judah Himango -
One thing that sucks is that, if generics were in .NET 1, there would be literally THOUSANDS of fewer types in the .NET framework. You could get rid of almost every delegate type; since all you really need are
Action<T>
andFunc<T>
and their overloads. Had we had generics in .NET 1, we wouldn't need events and EventArgs types, we could just useSystem.IObservable<T>
for the whole thing. So many things would have been better if they built in generics from the start. But, we're Monday Morning Quarterbacking here; hindsight is 20-20, and all that. I think Microsoft realizes the importance of generics now, but didn't then. And let's not pretend we all knew it was important. I remember thinking it was cool, but wasn't sure how useful it'd be. Turns out, pretty damn useful.Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon
Judah HimangoJudah Himango wrote:
And let's not pretend we all knew it was important. I remember thinking it was cool, but wasn't sure how useful it'd be.
I was at a presentation in early 2001 when some MVP was introducing C#. Someone asked why it didn't have templates and he responded: "We don't need templates when everything derives from Object". Couple of us who new STL started shouting at him, but he just couldn't get why templates are useful if everything derives from the same class.
-
My number one reason that C# 1.0 was half baked. And, there's still people using those non generic containers.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Giving you 5 in order to highlight your presence.
There is only one Ashley Judd and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
-
So you were the one who knows the right magic words for summoning Christian! What took you so long to cast the spell?
There is only one Ashley Judd and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
He just can't miss a good rant :)
-
One thing that sucks is that, if generics were in .NET 1, there would be literally THOUSANDS of fewer types in the .NET framework. You could get rid of almost every delegate type; since all you really need are
Action<T>
andFunc<T>
and their overloads. Had we had generics in .NET 1, we wouldn't need events and EventArgs types, we could just useSystem.IObservable<T>
for the whole thing. So many things would have been better if they built in generics from the start. But, we're Monday Morning Quarterbacking here; hindsight is 20-20, and all that. I think Microsoft realizes the importance of generics now, but didn't then. And let's not pretend we all knew it was important. I remember thinking it was cool, but wasn't sure how useful it'd be. Turns out, pretty damn useful.Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon
Judah HimangoIIRC Java didn't have generics back then, so it couldn't be high on the priority list... :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
... should be sentenced to spend their life fixing errors caused by downcasting from System.Object to concrete types when using non-generic collections.
Cool you've invented the Christian Graus trap!! :-D :thumbsup:
Watched code never compiles.
-
Judah Himango wrote:
And let's not pretend we all knew it was important. I remember thinking it was cool, but wasn't sure how useful it'd be.
I was at a presentation in early 2001 when some MVP was introducing C#. Someone asked why it didn't have templates and he responded: "We don't need templates when everything derives from Object". Couple of us who new STL started shouting at him, but he just couldn't get why templates are useful if everything derives from the same class.
Oh, I believe there were some in-the-know people who knew better. Look at the context: back then, Windows developers wanted something better than the C++/COM/VB6 mess. Remember? Java was looking so sexy. Microsoft countered with C#, which was exactly what we needed. It wasn't perfect -- missing generics and all -- but it was a better Java, and has only widened that gap since. Since Java didn't have generics back then, it wasn't on the radar for a lot of people. It's a shame, but hey, for version 1 of a product, MS did pretty darn well. By the way, I was at a tech talk the other week; the presenter, who's been writing C/C++ professionally for 30 years, was speaking on C++. He's never used templates.
Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon
Judah Himango -
IIRC Java didn't have generics back then, so it couldn't be high on the priority list... :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
That's correct. No Java generics at that time. Java didn't get generics until at least a year or two after C# 2, and even what Java got isn't real generics, it's just type erasure. (That is, a Java List<object> just gets compiled down to non-generic List.) I'm surprised it almost got cut from .NET 2. As Don Syme said, "No generics in C# 2.0? No LINQ in C# 3.0? No TPL in C# 4.0? No Async in C# 5.0? No F#?" So much is built atop generics, it's hard to imagine .NET without it.
Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon
Judah Himango -
... should be sentenced to spend their life fixing errors caused by downcasting from System.Object to concrete types when using non-generic collections.
Yeah, but Java didn't have them and 1.0 was pretty darn close to a port of java + a bit of delphi thrown in.
Curvature of the Mind now with 3D
-
Giving you 5 in order to highlight your presence.
There is only one Ashley Judd and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
Like CG needs rep points!
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre Have a bit more patience with newbies. Of course some of them act dumb -- they're often *students*, for heaven's sake. -- (Terry Pratchett, alt.fan.pratchett)
-
My number one reason that C# 1.0 was half baked. And, there's still people using those non generic containers.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Good to see you back Christian. I hope all is well with you and your own. Not much has changed hear...it never does. ;)
-- ** You don't hire a handyman to build a house, you hire a carpenter. ** Jack of all trades and master of none.
-
My number one reason that C# 1.0 was half baked. And, there's still people using those non generic containers.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Welcome back stranger
Semper Fi http://www.hq4thmarinescomm.com[^]
www.jaxcoder.com[^] WinHeist