A D vs. Rust example
Don Allen
donaldcallen at gmail.com
Fri Oct 21 20:11:18 UTC 2022
On Thursday, 20 October 2022 at 15:33:06 UTC, rikki cattermole
wrote:
> On 21/10/2022 4:25 AM, Don Allen wrote:
>> Where I do think D would do well by emulating Rust is in the
>> area of helpful compiler warnings: noting unused variables,
>> constants and imported symbols, pointing out unnecessary
>> parentheses, etc.
>
> IDE's such as IntelliJ IDEA (D's plugin) call Dscanner all the
> time to verify code and get warnings.
>
> So in practice this shouldn't be an issue.
In my experience, it is an issue. dub lint does not warn about
unused imports or unused constants, for example.
I also don't use an IDE, unless you consider nvim an IDE. And I
don't use dub to build my code (I'm open to it, but I've found
the documentation thoroughly inadequate), so using its lint to
check my code is more than a bit of a pain.
So for me, the D existing tools to statically evaluate code in a
manner similar to the Rust compiler are just not where I would
like them to be.
More information about the Digitalmars-d
mailing list