Arbitrary abbreviations in phobos considered ridiculous
Jonathan M Davis
jmdavisProg at gmx.com
Thu Mar 8 19:00:18 PST 2012
On Thursday, March 08, 2012 18:46:56 H. S. Teoh wrote:
> 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.
I see where you're coming from. It's just not the same for me. I find function
chaining to be much easier to read when it's done the normal way. And if I'm
looking for functions to be like a sequence of statements, then I'm going to
write them that way instead of chaining them.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list