Does anyone use 'with' statement?
Robert Fraser
fraserofthenight at gmail.com
Sun Dec 9 00:44:16 PST 2007
serg kovrov wrote:
> Hi,
>
> Recently I have studied a (proprietary language) code. The language
> features 'with' statement in the same sense that D does. To understand
> what this code sample really do I had to remove all 'with's and
> fix/compile code many times before it start working as original.
>
> I don't know why never tried to use it in my own code before, but now I
> definitely will NOT use it ever. Even if it could save me some typing. I
> found 'with' far more evil than even 'goto' (which I don't use as well).
>
> -- serg.
I agree the explicit way is more readable, but I don't have strong
feelings against the with statement if the object it's with is
referenced in every statement in the block.
Goto, used correctly, increase readability, IMO. Having ported some C++
code that used quite a bit of goto over to Java, and the temporary
boolean variables used seem less readable to me and often force code to
split up into many places.
More information about the Digitalmars-d
mailing list