出典:Wiktionary
出典:『Wiktionary』 (2025/10/26 15:53 UTC 版)
generic programming (uncountable)
出典:Wikipedia
出典:『Wikipedia』 (2011/06/22 19:52 UTC 版)
Generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate when used, thus reducing duplication. Software entities created using generic programming are known as generics in Ada, Eiffel, Java, C#, and Visual Basic .NET; parametric polymorphism in ML, Scala (possibly the only modern language that supports both parameterized types originating from functional languages and virtual types from the OO paradigm) and Haskell (the Haskell community also uses the term "generic" for a related but somewhat different concept); templates in C++; and parameterized types in the influential 1994 book Design Patterns. The authors of Design Patterns note that this technique, especially when combined with delegation, is very powerful but that "Dynamic, highly parameterized software is harder to understand than more static software." (Gang of Four 1995:21)