Generics

Alan Kay Alan.Kay at squeakland.org
Sun Sep 28 18:37:40 UTC 2003


And, actually, the term "generic messages" predated "polymorphic" and 
ADA by a number of years -- ("polymorphism" is a term from the math 
of functions and doesn't quite "apply" to dynamic OOP languages). 
Another very powerful way of thinking about all this also happened 
quite a while before ADA in the design of Algol-68 (which had some 
truly interesting ideas).

Cheers,

Alan

-----



At 10:02 AM -0700 9/28/03, Andrew Berg wrote:
>...taking this off-list since it is so off-topic...
>
>On Sun, 28 Sep 2003 09:43:41 +0100, Phil Hudson <phil.hudson at iname.com> wrote:
>
>>
>>BTW, "generics" is a (badly named, IMO) synonym of the other terms. It's
>>the term usually used in discussions of adding type-safe collections to
>>Java. It doesn't mean what you (and I, initially) intuitively grasped. I
>>don't know how it originated.
>>
>
>A quick (off-topic) history lesson.  As I understand it, generics 
>were first implemented in ADA, which was a strongly, statically 
>typed language.  In ADA, since there was no type coersion, 
>collections were implemented as generic packages:  One in which one 
>or more of the types were undeclared at the time of package 
>compilation.  Then the package could be instantiated into a concrete 
>package, much like how templates work in C++.
>
>I think that the term predates C++'s "template" by about 5 years. 
>One of the reasons that ADA generics worked better than C++'s 
>template types is that they were constrained to packages and had 
>tighter integration into the language.  Templates, in comparison, 
>feel much more like a slightly improved macro preprocessor.
>
>-andrew
>
>--
>andrew_c_berg at yahoo.com


-- 



More information about the Squeak-dev mailing list