3 ms·
Yet they are extremely powerful. Whatever their flaws may be, I have worked with your preferred version of templates (C# generics) and, let me tell you, they ar
by EpicEng 13y ago
Yet they are extremely powerful. Whatever their flaws may be, I have worked with your preferred version of templates (C# generics) and, let me tell you, they are inferior in every practical way.
- pkolaczk 13y agoHuh, where did I say my preferred version of templates were C# generics? As of C++ templates being extremely powerful - I agree. But this is a similar kind of "powerfulness" as C macros are, only little safer. Technically they are still just a fancy macrogenerator working at the AST level instead of lexer level, knowing nothing about the types (you even have to tell it which symbols are the types, because it cannot reason it out from syntax). IMHO it is years behind true generic typesystems like in Haskell, OCaml or Scala and calling it a "type system" is an exaggeration.