13.1. J# Generic Limitations

The fact that generics are part of the CLS specification might lead you to believe that all of the .NET languages have equal generic capabilities. Unfortunately, this assumption is not valid. To conform to this specification, a .NET language must only be able to consume generic types. Support for the creation of generic types, therefore, is not required. This reality is especially significant to J# developers, because the J# language will only support the consumption of generic types in the initial release of version 2.0 of the .NET Framework.

The inability to create generic types will certainly be viewed as a significant limitation if you use J# as your primary development language. That said, having the ability to fully consume generic types and reference generic interfaces within your J# code is still quite powerful. Without this fundamental functionality, J# would have faced some serious challenges. My expectation is that generics will be showing up in more and more public .NET APIs, and any language that isn't able to at least consume generics is likely to lose some of its appeal.

Even though the current J# implementation lacks support for producing generics, I would expect a subsequent version to overcome this weakness in the not-too-distant future.

Get Professional .NET 2.0 Generics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.