Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
3. Therefore reified generics are not possible to implement in a backwards compatible way.
Ok, sure, but if you instead a new generic collection types and leave the old ones alone, you don’t have to worry about breaking existing compiled code.
This comment about C# suggests a lack of familiarity with the approach C# took:
> C# made the opposite choice — to update their VM, and invalidate their existing libraries and all the user code that dependend on it.
All of the pre-generic C# libraries continue to exist to this day (ArrayList, HashTable, and the non-generic IEnumerable). Applications that used them never stopped working. New code uses the generic collections (List and Dictionary).
Anyways, I think the costs that Java is currently paying for non-reified generics (reflection, performance, and type safety mentioned in the article) is not worth the backwards comparability with the 20 year old J2SE 1.4. The price C# pays for making a backwards incompatible generics (mostly some minor annoyance when designing a collection class implementing IEnumerable) is worth it at this point.
P.S. ok, I do admit that C# forking the collection library is still causing ongoing maintenance work 18 years later: https://github.com/dotnet/winforms/pull/8673
Related posts
- Ask HN: Any way to write a simple desktop app anymore?
- A GitHub issue suggests the removal of the WebBrowser control in WinForms. If you think this is a bad idea, be sure to voice your disapproval on the issue!
- WPF Roadmap 2023
- Where are these images stored?
- Does anyone know how to make a UITypeEditor for Winforms that works in .NET 6?