Fun with range deprecations

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 11 17:30:42 PDT 2014


On Tue, Aug 12, 2014 at 12:18:26AM +0000, Meta via Digitalmars-d wrote:
[...]
> What about modifying is(typeof(...)) to return false for deprecated
> symbols?

Wouldn't that break deprecated code? If the user compiles with -d, then
deprecated code should compile, but with this change, it may not.

One possible hack is to make is(typeof(...)) return true for deprecated
symbols if compiling with -d, but that would mean changing language
semantics with compiler flags, which Walter frowns on.


> The thing is that this will break code, and it will continue to break
> code in the future if somebody deprecates a symbol which is used in an
> is(typeof(...)) expression. That makes it a lot harder for us to
> deprecate anything. There doesn't seem like any *good* solution to
> this problem.

A bunch of us on bugzilla and github banged our heads together to come
up with a good solution, but none seems forthcoming, which is why I
brought the discussion here to the forum.


T

-- 
Music critic: "That's an imitation fugue!"


More information about the Digitalmars-d mailing list