It will make code more concise. It's already possible, returning this from a method, but it prevents using the return value for something more useful. Here is an example:
apple := Fruit new() setColor("green") $ setType("apple")
Here setType doesn't refer to the return value of setColor, but instead to the last non-chained method (here it's new, so it refers to the new instance of Fruit)
It will make code more concise. It's already possible, returning
this
from a method, but it prevents using the return value for something more useful. Here is an example:apple := Fruit new() setColor("green") $ setType("apple")
HeresetType
doesn't refer to the return value ofsetColor
, but instead to the last non-chained method (here it'snew
, so it refers to the new instance of Fruit)