12.10. STL.NET

With version 2.0 of the .NET Framework, the C++ language also inherits a new library that is being referred to as STL.NET. This library represents a new implementation of the popular and widely adopted STL template library that includes a wide array of useful templates. This new library provides an implementation of the STL library that leverages both C++ templates and generics.

Naturally, the presence of this library raises a number of questions. Although STL.NET will likely strike a balance between generics and templates, it will also create some confusion around interoperability and standardization. Should you, as a developer, use STL.NET or should you confine yourself to the System.Collections.Generic namespace and view that as the de facto standard? Although there's plenty of debate surrounding this topic, I'm not sure there's any black-and-white answer for C++ developers on this question. Like everything else in the world of development, the real answer is: It depends.

Controversy and standardization aside, STL.NET appears to represent an interesting and powerful approach to making a .NET variant of STL that has the freedom to take full advantage of the .NET platform. In this light, STL.NET represents a significant breakthrough for C++ developers.

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.