News for hackers. Stuff that matters.
Re:Project Valhalla, Explained: How a Decade of Work Arrives... by to11mtm on Friday June 19, 2026 @01:19PM (#48600778)
I think DotNet had a bit of benefit, in that the language was still new enough to do the hard breakage. It was only about 3.5 years between NET1.0 and 2.0 (Where generics were added.)
Re:Project Valhalla, Explained: How a Decade of Work Arrives... by PaulHoule on Friday June 19, 2026 @11:40PM (#48606162)
I was annoyed by it back when I was doing Silverlight/ASP.NET

Thing was a lot of Microsoft APIs for GUIs and whatnot used the List and if you wanted to use the List<X> you had to copy the list or make a wrapper or something. You might say, "just use the List" but at that point (circa 2008) I had to also use the List<X> for some API so I always had to do some conversion.

Re:Project Valhalla, Explained: How a Decade of Work Arrives... by int_19h on Saturday June 20, 2026 @12:30AM (#48606350)
The way it worked in practice is that all the new built-in collections in System.Collections.Generic implemented the non-generic interfaces as well, so e.g. List<T> implements IList<T>, but it also implements IList (explicitly), and similarly for ICollection and IEnumerable.

Then, when WinForms or WPF wanted a list, you could just give it a List<T> instance, and it would talk to it via IList, boxing and unboxing if necessary.

What you describe happened in the other direction - if you had, say, a generic method operating on IEnumerable<T> or IList<T>, and wanted to pass it a WinForms collection. WinForms generally defined strongly typed collection classes on a case by case basis, but none of them implemented the new interfaces. It was there where you had to wrap things, most often using AsEnumerable<T>().