Returning self is not needed for method cascades in Smalltalk. Actually the return values are ignored because all methods of a cascade are sent to the same receiver. Only the last return value is used as result of the whole cascade.
The method cascade in Smalltalk is written as follows: receive method1: x; method2: y; method3: z. i.e. messages which ar part of the cascade are separated by ';' and the statement is finished by '.' like all statements in Smalltalk. -Thorsten > Am 14.04.2016 um 17:23 schrieb Tino Heth via swift-evolution > <[email protected]>: > > >> (in Smalltalk, like in Swift?, if i remember correctly, ‘self’ is implicitly >> returned in absence of a return value and can be ignored. > I'm a big fan of returning self — its much more useful than void… > But it seems the Swift-community doesn't like method chaining. > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
