Updated Go2GenericsFeedback (markdown)

Dag Sverre Seljebotn 2018-08-28 21:13:07 +02:00
parent c57cdf7e76
commit d44e3a3152

@ -13,4 +13,4 @@ As the amount of feedback grows, please feel free to organize this page by speci
## Quick comments
- Dag Sverre Seljebotn: C++ has a huge problem with people abusing metaprogramming ("generics") to do compile-time metaprogramming. I really wished Go had gone down the path of Julia, which offers hygienic macros. Even if it is kept strictly at a compile-time barrier and no run-time code generation, this would at least avoid all the bad tendencies we see in the C++ world that comes from their templating system. Things you can do with generics you can usually pull off with macros too (e.g., `IntMap = MakeMapMacro!(int,int)` or similar, then use IntMap as a type). Link: https://docs.julialang.org/en/v0.6.1/manual/metaprogramming/
- Dag Sverre Seljebotn: C++ has a huge problem with people abusing metaprogramming ("generics") to do compile-time metaprogramming. I really wished Go had gone down the path of Julia, which offers hygienic macros. Even if it is kept strictly at a compile-time barrier and no run-time code generation, this would at least avoid all the bad tendencies we see in the C++ world that comes from their templating system. Things you can do with generics you can usually pull off with macros too (e.g., `SortSliceOfInts = MakeSliceSorterFunctionMacro!(int)` could generate a new function to sort a slice of integers). Link: https://docs.julialang.org/en/v0.6.1/manual/metaprogramming/