top | item 9327343

(no title)

frowaway001 | 11 years ago

> It isn't possible to implement this by just overloading `()` without introducing dramatic new language features.

Yes, that's understood, and I suggested one possible approach multiple times already.

Even if there wouldn't be an easy solution ... would this requirement be important enough to wreck the whole language?

I don't believe it. It's not like the situation is "we did X here and caused issue Y over there" ... the issues are all over the place,and the cost/benefit ratio is completely off.

> is entirely wrong

It's tongue-in-cheek, I think we all know what's going on behind the scenes. Another example is x[3] = 42 vs. x[3]. x[] does completely different things here, and it would be an issue if people wanted to use the same method, but thankfully, no one is proposing that.

> No Rust dev is proud that there's no overloading... that sentence doesn't even make sense, as every operator can be overloaded, including the () call syntax.

I referred to method overloading.

discuss

order

No comments yet.