Does D have too many features?

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Apr 29 21:25:49 PDT 2012


On Sun, Apr 29, 2012 at 10:26:40PM +0200, Alex Rønne Petersen wrote:
> On 28-04-2012 22:43, H. S. Teoh wrote:
[...]
> >with statements. They make code hard to read, and besides you can (or
> >should be able to) alias long expressions into a short identifier for
> >this purpose anyway.
> 
> I don't think I agree entirely here. If you have very long sequences
> of statements operating on the same object, with can be very useful.
> That said, I recognize that the current implementation of with needs
> some work.
[...]

I think the correct solution here is to use alias. (If that doesn't
work, then it should be made to work. It's a lot cleaner and doesn't
introduce potentially nasty ambiguities into code, as well as make code
more readable without needing to implement nested symbol tables in your
brain.)


T

-- 
Help a man when he is in trouble and he will remember you when he is in trouble again.


More information about the Digitalmars-d mailing list