Jquery is not a language
Same object or some object?
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.
Misleading jQuery Example
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.
C# and LinQ
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 (talk • contribs) 16:13, 15 February 2016 (UTC)
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 even though line breaks are often added between methods. — Preceding unsigned comment added by Wycats (talk • contribs) 19:28, 17 November 2017 (UTC)
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:
- Added archive https://web.archive.org/web/20110222112016/http://firstclassthoughts.co.uk/java/method_chaining.html to http://firstclassthoughts.co.uk/java/method_chaining.html
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
You may set the
|checked=, on this template, to true or failed to let other editors know you reviewed the change. If you find any errors, please use the tools below to fix them or call an editor by setting
|needhelp= to your help request.
- 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.
If you are unable to use these tools, you may set
|needhelp=<your help request> on this template to request help from an experienced user. Please include details about your problem, to help other editors.