Proposal: Class Templates
claude.pache at gmail.com
Wed Jan 16 09:42:06 UTC 2019
From what I understand (that is, not much), class templates are useful in strongly typed languages, so that one can have a family of classes that share the same implementation but that derive from different types; e.g. Stack<int> for stacks of ints and Stack<string> for stacks of strings. In JS, you can have one Stack class that accepts both ints and strings, so that this use case doesn’t apply (or, at least, it is not a necessity).
But I'm sure there are other use cases. What are they, and are they compelling enough?
> Le 15 janv. 2019 à 19:59, IdkGoodName Vilius <viliuskubilius416 at gmail.com> a écrit :
> See: https://github.com/CreatorVilius/ecmascript-proposals/blob/master/proposal-class-templates.md <https://github.com/CreatorVilius/ecmascript-proposals/blob/master/proposal-class-templates.md>
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss