3 ms·
I think that generic programming wasn't really a thing until Stepanov with the STL in the 1990s. There may have been glimmerings of it, but I know of no actual
by AnimalMuppet 6y ago
I think that generic programming wasn't really a thing until Stepanov with the STL in the 1990s. There may have been glimmerings of it, but I know of no actual, significant implementations before that.
Corrections welcome...
- to11mtm 6y ago> Corrections welcome... You're cool. Most think ML[0] did it first, and dare I say did it right first. It gets rid of entire categories of boilerplate (interfaces come to mind) because types are fully inferred. In other words, if `funpost(request)` uses .User, .Body, .Time, from request, the only requirement is that the 'request' object has those properties with correct types further down the chain in usage. Other languages can do this but not typically to the degree in ML's type system (known as Hindley-Milner [1]). There are times it can't quite figure it out but it is, again, less frequent than in others. [0] - https://en.wikipedia.org/wiki/ML_(programming_language) https://en.wikipedia.org/wiki/ML_(programming_language) [1] - https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_sy...
- AnimalMuppet 6y agoOK. That's still in the 70s, though, not the 60s (going back to elric's question).
- to11mtm 6y agoIf you want to get pedantic I'd argue Generic programming is a subset of metaprogramming. To that end I'll go ahead and state that Lisp (1958) is probably the language I have done the MOST programming I would describe as 'generic'.