On Tuesday, 2 June 2015 at 18:44:30 UTC, Dicebot wrote:
Is there any reason to not allow argument to be any expression and reject non-string ones at semantic phase?

Probably just simplicity and the fact that it really doesn't make sense to use anything other than a string literal in a deprecated message. It's just that not allowing ~ in it makes it difficult when the string gets long (which you usually should avoid, but sometimes, it's unavoidable).

Personally, I don't really care with any string argument is permitted so long as its value is known at compile time, but the only way that it would even vaguely make sense was if someone were doing something to automatically generate deprecation messages, which seems rather odd to me. Maybe so they can put a date in them, and they only want to put that date in one place? Certainly, I have to stretch to think of a reason why you'd ever do anything more than "msg" or "msg" ~ "msg".

- Jonathan M Davis

Reply via email to