On Tue, Jun 7, 2022 at 6:56 PM Felipe Gasper <felipe@felipegasper.com> wrote: > Changing the wording of the error message as it stands risks breaking > preexisting applications. So it seems imprudent to do it without a > feature/pragma. This is true. It also kills me every time I see that. One of the (many) beautiful things of throwing exceptions is being able to test the class of the object. If people do that, changing the wording of the error message isn't that big of a deal (and makes it safe to localize, provide additional information about the error, etc.) I really wish warnings were the same: objects that stringify intelligently. If your application or tests trap it, they use the class to figure out the type of warning it is and the actual text is for the poor humans writing the code. Relying in arbitrary text is fragile code. *Providing* arbitrary text and nothing else is proving fragile code. I wish we didn't do that. So many of these "we can't change the text" discussions would simply go away. /end rant Curtis "Ovid" Poe CTO, All Around the World World-class software development and consulting https://allaroundtheworld.fr/Thread Previous | Thread Next