i want to chain 'new' with method calls on the created object. i found this on the internet:

window.mainWidget = (new Button()).text("Hello world"d).textColor(0xFF0000);

it would look much nicer with UFCS:

window.mainWidget = Button.new().text("Hello world"d).textColor(0xFF0000);

well, it's not *exactly* UFCS but you get what i mean.

Reply via email to