[Mono-dev] "AvoidBadAsCast" Gendarme rule? (was: Re: [PATCH] The big "as" cast cleanup)

"Andrés G. Aragoneses" knocte at gmail.com
Sun Jan 13 13:25:00 EST 2008


Miguel de Icaza escribió:
>> I don't like to change working code unnecessarily just for your
>> preference. I'd wait for another patch that removes any extra changes.
> 
> I agree with Atsushi's statement, and also:
> 
>> Personally I like as operator which sometimes makes the sources
>> more readable and kind enough for code completion depending on
>> the editor/IDE.
> 
> miguel.

Hey Miguel, I don't agree :)

Readability is a good thing, but not when it makes your code incorrect.
Nobody should use "as" if afterwards there is not a check to see if the
result is null or not. BTW, maybe this is a good candidate for a
Gendarme rule?

Regards,

	Andrés	[ knocte ]

-- 




More information about the Mono-devel-list mailing list