On Saturday, 21 February 2015 at 11:37:57 UTC, ponce wrote:
The most striking difference from D and C++ seems to be that
templates generates polymorphic code that works for all types.
IIRC it is called "parametric polymorphism" whereas the C++-way
would be "ad-hoc polymorphism".
This has a runtime cost and is usually done by FP languages
like Ocaml/Haskell.
Yep, he is using fat pointers with hashing.
https://github.com/scross99/locic/issues/1
I suppose a compiler could improve on that with whole program
optimization? The nice thing about this is that you can add
polymorphism to existing C libraries if I get Loci right.