3 ms·
SmallTalk has the correct answer here, with its method chaining operator `;`, I feel. For cases like this where you build complex state on an object via method
by arnsholt 7y ago
SmallTalk has the correct answer here, with its method chaining operator `;`, I feel. For cases like this where you build complex state on an object via method calls, it gives some pretty nice code. And since it's a separate construct, the individual method calls can have return values that make sense too, as opposed to this style of interface where the methods all have to return the object again for chaining.