private(this) vs LINT

Daniel N no at public.email
Tue Jun 28 13:45:13 UTC 2022


On Tuesday, 28 June 2022 at 03:52:08 UTC, forkit wrote:
> On Monday, 27 June 2022 at 20:23:26 UTC, Daniel N wrote:
>> I was just thinking, if we had a standard linter, it could 
>> solve many issues without bloating the language, since the 
>> compiler exists as a library it should not be too difficult to 
>> maintain either.
>>
>> This way we can both keep the cake and eat it.
>
> I'm curious how a linter would have helped me here
> (see the comment I had to make ***to myself** in the unittest 
> section)
>

>     // Don't accidently use v.sz like I did intially.
>     for (int i = 0; i < v.size(); i++)

dmd-fe would have told you don't use 'sz' as it is private.



More information about the Digitalmars-d mailing list