On Monday 11 July 2011 03:41:20 Adam D. Ruppe wrote: > General annoyance: > $ dmd *.d > Warning: As of Phobos 2.054, std.ctype has been scheduled for deprecation in > January 2012. Please use std.ascii instead. > Warning: As of Phobos 2.052, std.date and std.dateparse have been scheduled > for deprecation in August 2011. Please use std.datetime instead. > Warning: As of Phobos 2.054, std.string.toupper has been scheduled for > deprecation in January 2012. Please use std.string.toUpper instead. > Warning: As of Phobos 2.054, std.string.tolower has been scheduled for > deprecation in January 2012. Please use std.string.toLower instead. > arsd/web.d(702): Error: non-final switch statement without a default is > deprecated > > > > One of these is not like the other - the last line actually tells > me where the problem is with a file and line number so fixing > it is easy. > > > The others just blab stuff out. IMO these scheduled for deprecation > warnings are more annoying to me than just having outright errors!
The deprecation messages are pragmas. They _can't_ give a useful line number. For them to be appropriately useful, they'd have to give the file and line number where the module was imported (in the case where a module is scheduled for deprecation) or the line number where the function was used (in the case of a function is scheduled for deprecation). Pragmas can't do that. Now, maybe the pragma messages shouldn't have be prefaced with warning (since they're _not_ a compiler warning), but there's no way for them to give file and line numbers. They're doing the best that they can. - Jonathan M Davis
