Facilitating the spread of knowledge and innovation in professional software development



Choose your language

InfoQ Homepage Generics Content on InfoQ


RSS Feed
  • Rust 1.51 Stabilizes Const Generics MVP, Improves Cargo and Compile Times

    Rust 1.51 brings to stable a minimum value proposition for const generics, which enable parametrizing types by constant values, for example integers, as opposed to types or lifetimes. The new Rust release also includes improvements to Cargo with a new feature resolver, and faster compile times on macOS.

  • Generics Enter Go Change Proposal Process

    Generics, one of the features more frequently requested by Go developers, are making their way into the language based on a draft design that has been evolving for the last couple of years and is now entering the language change proposal process.

  • Go Contracts Will Enable Generic Programming

    A new draft to add support for generic programming to Go is centered around the concept of contracts, which are used to constrain type parameters to types and functions. The draft also introduces type inference to simplify the use of generic types and functions by allowing developers to omit types in many cases.

  • TypeScript 2.3 Adds Generic Default Arguments, Async Iterators Support, and More

    TypeScript 2.3 extends the language syntax by adding support for declaring defaults for generic type parameters and for async generators and iterators. It also aims to improve integration with existing JavaScript code with a new compile option and introduces official support for language server plugins.

  • New JEP Would Simplify Java Type Variance

    A new JEP Candidate proposes to facilitate the handling of type variance in Java. The new proposal, potentially targeting Java 10, would add a means for specifying the default variance in the definition of generic types, different to the current style of indicating it through wildcards at instantiation. This proposal is not a replacement for wildcards, but rather a way to reduce the need for them.

  • Java Enums to Be Enhanced with Sharper Type Support

    Java enums will be enhanced with generics support and with the ability to add methods to individual items, a new JEP shows. Since both features can be delivered with the same code change, they are bundled together in the same JEP. The change only affects the Java compiler, and therefore no runtime changes are needed. Although there is no target version, Java 10 seems likely.

  • Richard Warburton and Raoul-Gabriel Urma Review the History of Generics in Java at Devoxx UK

    Richard and Raoul, who provide in person training courses on Java 8, offered a joint presentation at Devoxx UK 2015 where they discussed the origins and motivations for Generics in Java, some of the less known current features, and a glimpse of what might be coming up in Java 10. The presentation was split into three distinctive sections: past, present and future of Generics.

  • Under the Hood with a Prototype of Enhanced Generics for Java

    Although Java 8 only shipped earlier this year, with Java 9 not due until mid-2016, a first prototype of features expected for Java 10 has appeared, including an overhaul of Java's generics.

  • C++14 Is Here: Summary of New Features

    C++14, the new C++ standard succeeding C++11, has been finally approved and is heading to ISO for publication this year. While improvements in C++14 are "deliberately tiny" compared to C++11, says C++ creator Bjarne Stroustrup, they still "add significant convenience for users" and are a step on the route to make C++ "more novice friendly."

  • Interview: Don Syme Answering Questions on F#, C#, Haskell and Scala

    In this interview made by InfoQ’s Sadek Drobi, Don Syme, a Senior Researcher at Microsoft Research, answers questions mostly on F#, but also on functional programming, C# generics, type classes in Haskell, similarities between F# and Scala.

  • Covariance and Contravariance in .NET Generics

    Currently .NET languages such as VB and C# do not support covariance and contravariance for generics. While this is not likely to chance in the near future, people at Microsoft are talking about it.

  • Two years later, frustration with Generics continues

    Laird Nelson describes his frustrations with understanding Java Generics. While clear in the simple case, as he works through a more complicated scenario, he ends up throwing them away because they're so complicated. Are we helping or hurting ourselves by using Generics?