|
 |
Warp wrote:
> Basically, it seems, that instead of having to write, for example,
> "someFunction(anObject)" you can write "anObject.someFunction()".
Syntax sugar. And let lets you do things like
"Hello".toUpper().myConversion().trim("o")
so you can chain them together.
The same benefit you get in C++ from being able to make classes with no
virtual members. You often talk about how you can have an array of points
in C++ without any extra overhead and still treat them like objects, yes?
Same sort of thing here.
Note too that it might interact with overloading and implicit casts.
short s = ...;
s.myThing(); // I know what this calls.
yourThing(s); // Does this cast "s" to an integer first?
--
Darren New, San Diego CA, USA (PST)
"Ouch ouch ouch!"
"What's wrong? Noodles too hot?"
"No, I have Chopstick Tunnel Syndrome."
Post a reply to this message
|
 |