Untyped templates in what sense? Pre-C++-20 expresses type constraints in various forms: type traits, compile time assertions, expression testing, etc. Moreso, C++ 20 has concepts, which I believe is really really powerful.
-
-
-
Think about how you might compile C++ templates without expanding them first. (You can’t)
- 18 more replies
New conversation -
-
-
Wow, this issue is a pet peeve of mine as a user of D on a large codebase. Had the urge to create a language to show case this dual compilation mode, but now I don't have to. Does rust have this already?
-
FWIW, Swift implements generics via separate compilation (lots of dynamic dispatch under the hood), and has optimization passes that monomorphize based on usage. The model works fairly well, although the performance can sometimes be unpredictable based on what gets monomorphized
- 3 more replies
New conversation -
-
-
You are taking it too seriously, haha. People don't dislike monomorphization. There are singular voices that dislike x for any x.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Its awesome so atleast you CAN pick the option. I still choose to avoid generics wherever i can, but thats for compiletime purposes. Everytime i see a <T> i go. Here we go mr compiler.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
IMHO, monomorphization is a compiler optimization- the answers "always" and "never" are both wrong, the correct answer should be "when the compiler decides it's worthwhile".
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.