Talk:Method chaining

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Jquery is not a language[edit]

Can we get some non-jquery Javascript examples, maybe subsection jQuery inside of it? ----- eranimo

Same object or some object?[edit]

Typically, method chaining simply consists of many methods on a class, each of which return the current object itself.

Isn't this rather atypically? One often encounters methods chained together, with each method returning some object, not necessarily the same object from which the first method was called.

For example, this "official" Java tutorial uses the notion method chaining for methods chained together, with each method invocation returning some object.

--Abdull (talk) 11:06, 12 June 2009 (UTC) --202.53.168.118 (talk) 07:22, 20 October 2011 (UTC)Swapno[reply]


Misleading jQuery Example[edit]

It also makes code more clear and prevents executing the same selection several times (hence improving performance).

It is easily possible to not execute the same selection multiple times without method chaining, with the following example :

person = $('#person');
person.slideDown('slow');
person.addClass('grouped');
person.css('margin-left', '11px');

The claim that method chaining improve performance by not executing the same selection several times is wrong.

Aralicia (talk) 08:54, 21 May 2013 (UTC)[reply]

C# and LinQ[edit]

Why don't you cite C# and LinQ as examples of method Chaining? LinQ syntax introduced with C# 3.0 transpose a query expression to a chain of function calls. Using also lambda function to generate mapping between results and construct predicate, we create a functional language over the classical static type C# language. Gnbc (talk) 16:18, 15 February 2016 (UTC) comment added by Gnbc (talkcontribs) 16:13, 15 February 2016 (UTC)[reply]

POV dispute[edit]

This page is negatively tilted against its topic.

> A method chain is also known as a train wreck due to the increase in the number of methods that come one after another in the same line that occurs as more methods are chained together[4] even though line breaks are often added between methods. — Preceding unsigned comment added by Wycats (talkcontribs) 19:28, 17 November 2017 (UTC)[reply]

External links modified (January 2018)[edit]

Hello fellow Wikipedians,

I have just modified one external link on Method chaining. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 18 January 2022).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 19:11, 26 January 2018 (UTC)[reply]