Arbitrary abbreviations in phobos considered ridiculous

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Mar 8 18:46:56 PST 2012


On Thu, Mar 08, 2012 at 07:07:49PM -0500, Jonathan M Davis wrote:
> On Thursday, March 08, 2012 15:52:37 H. S. Teoh wrote:
[...]
> > $(selector)
> > .html(htmlcode)
> > .add(more_nodes)
> > .css(some_styles)
> > .filter(unwanted_nodes)
> > .click(click_handler)
> > .show();
> > 
> > Writing this in function composition order would cause an instant
> > quantum leap in unreadability.
> 
> Which just goes to show that it's also a question of what you're used
> to, because I find that using the order that you did here rather than
> normal function call chaining is what causes an instance quantum leap
> in unreadibility.
[...]

The order I did it here can be read from top to bottom, just like a
sequence of statements. The function composition order would have to be
read from bottom to top, contrary to the general flow of control in the
rest of the code. That's what makes it unreadable.


T

-- 
If it tastes good, it's probably bad for you.


More information about the Digitalmars-d mailing list