On 2011-10-02 22:16, Jonathan M Davis wrote:
On Sunday, October 02, 2011 10:48:53 Jacob Carlborg wrote:
On 2011-10-02 07:24, Jonathan M Davis wrote:
There has been a fair bit of discussion about improving deprecated in
this pull request:
https://github.com/D-Programming-Language/dmd/pull/345
I have not read the discussion on github but an idea would be to have
several levels of deprecation. Instead of "soft" and "hard" there could
be numbers. Say level 1 could be used for scheduled for deprecation and
depending what flags will be used when compiling it could print some
kind of message. Level 2 would be soft deprecate and level 3 would be
hard deprecate. There could also be more levels in between these levels
if we want.

The idea is that the user can use a compiler flag to get messages about
symbols that are scheduled for deprecation.

Don't know if this is too complicated.

And what would each level do? How would it interact with the compiler?

The feature needs to be simple. Deprecation is not something that is going to
need to be used frequently, so making it particularly complicated is
undesirable. It needs to be effective but easy to use. What we have is better
than nothing, but it isn't quite good enough. So, it needs to be improved. But
we don't need it to be vastly more powerful than it currently is, just iron it
out a bit. Your suggestion sounds like it would be getting a bit complicated.

- Jonathan M Davis

I was thinking that the levels match to different types of compiler messages. Above one level you get a note, above the next level a warning and above yet another level you get an error. Then it's up to the users to decide what a given level means.

--
/Jacob Carlborg

Reply via email to