by tlrobinson · 15y ago · 0 comments
item = new Item title: "Awesome", id: 2
Less isn't always better. I like the parens, at least if there's more than one argument. item = new Item(title: "Awesome", id: 2)
It's much easier for me to glance at this and know what's going on.It only gets worse with nested function calls:
item = new Item title: new Title "Awesome", id: 2
The syntax isn't ambiguous, but that doesn't mean it's easy for humans to parse.item = (new Item title: "Awesome", id: 2)