if(arr) now a warning
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Thu Apr 30 15:36:57 PDT 2015
On Thursday, 30 April 2015 at 21:58:17 UTC, Brian Schott wrote:
> On Thursday, 30 April 2015 at 18:07:12 UTC, deadalnix wrote:
>> This one is quite straightforward. Dfix could probably handle
>> it.
>
> I'd have to rewrite dfix on top of SDC to get this working.
> dfix can only work at the lexical and AST level at the moment.
> As soon as you need information like "Is this a dynamic array?"
> you need a compiler.
>
> I could try using DCD's "suhmantick analisyss"[1] code to try
> to get this to work, but it wouldn't work correctly in a lot of
> cases.
>
> [1] it's really dumb, but works well enough for an
> auto-complete engine
I'm sure that with "suhmantick analisyss" one can get a good cunk
of the tests (not all, but something large enough). This paired
with making the thing a warning rather than an error, should
provide an easy transition path.
More information about the Digitalmars-d
mailing list