Content deleted Content added
m Page linked to article that didn't exist. Changed to proper article (wiki/Line_Break to wiki/Newline) |
|||
Line 14:
| year = 2008
| isbn = 0-13-235088-2
}}</ref> even though [[newline|line breaks]] are often added between methods.
A similar syntax is [[method cascading]], where after the method call the expression evaluates to the current object, not the [[return value]] of the method. Cascading can be implemented using method chaining by having the method return the [[this (computer programming)|current object itself]]. Cascading is a key technique in [[fluent interface]]s, and since chaining is widely implemented in object-oriented languages while cascading isn't, this form of "cascading-by-chaining by returning <tt>this</tt>" is often referred to simply as "chaining". Both chaining and cascading come from the [[Smalltalk]] language.
|