top | item 46278082

(no title)

sunshowers | 2 months ago

Note that while C++ templates are more powerful than Rust generics at being able to express different patterns of code, Rust generics are better at producing useful error messages. To me, personally, good error messages are the most fundamental part of a compiler frontend.

discuss

order

wakawaka28|2 months ago

Concepts make it possible to generate very clear (even user-friendly) template errors.

sunshowers|2 months ago

True but you lose out on much of the functionality of templates, right? Also you only get errors when instantiating concretely, rather than getting errors within the template definition.