For example, in Dart, the cascade: is equivalent to the individual calls: Method cascading is much less common than method chaining – it is found only in a handful of object-oriented languages, while chaining is very common.
Cascading is syntactic sugar that eliminates the need to list the object repeatedly.
The following chain (in C++): is equivalent to the simple form: The following cascade (in Dart): is equivalent to the simple form: Cascading can be implemented in terms of chaining by having the methods return the target object (receiver, this, self).
Within the component statement of the with statement, the components (fields) of the record variable specified by the with clause can be denoted by their field identifier only, i.e. without preceding them with the denotation of the entire record variable.
Dart uses properties, and thus rather than using method syntax for getters and setters (foo.getBar(); foo.setBar(b);), it uses field value/assignment syntax (foo.bar; foo.bar = b;), and cascades work with assignments: is equivalent to: The builtin doto macro can be used in Clojure to call multiple methods on the same object without binding it to a variable, which is mostly useful to operate on mutable objects from the host language.