On Friday, 29 December 2017 at 22:05:31 UTC, I Love Stuffing wrote:
On Friday, 29 December 2017 at 09:46:05 UTC, JN wrote:
AFAIK Rust doesn't have templates, but generics. Generics usually have much cleaner error messages because they are mostly used for generic functions and classes, meanwhile templates can do that too but much, much more, but when they break, you get entire paragraphs of template errors.

Templates are bad because they write code for you. And it's that code you don't write that could have errors. It's a double edge sword.

Also, for a mature D, some damn collections. Queues, Stacks, Deques, etc...

Yes, it's the same issue in C when using complicated macros. You have to do all substitutions by hand to understand the real error message. D templates have more information so there's hope to get a better resolution of the error cause. But, the error message thing is a double edge sword, the more information is given the more difficult it gets to quickly find what the issue is. Again to illustrate with my C experience (sorry I'm paid for programming C, D is hobby that I try to sneakily introduce). The gcc 4 error messages were simple 1 lines errors, from gcc 5 on they introduced the multi-line errors with positioning like in that Rust example above. At the beginning I was quite happy with that as the error messages are so much more detailed, but now after some time, I find them really annoying as it is much more eye straining to find the real error message in between the positioning text.

Reply via email to