Re: Execution Contexts
Posted: Tue May 21, 2013 10:44 am
@DarScott: As I said above, I don't see the executionContexts going anywhere and its more likely if we did add new debugging functionality then it would use its own new syntax. However, there is a case to be made for making more specific syntax for the types of things people use the executionContexts for.
The reason I thought 'the caller' might make a nice addition to the language is that it helps scripts provide functionality that is more engine-like without depending on the executionContexts (for example, the socket commands tie messages to the object that called the command).
It would also be nice to refashion 'return ... with ...' to set 'it' in the caller (that syntax does exist at the moment, but is only used by libUrl and for no particularly good reason - it was put it to save a string copy IIRC, although that's not really necessary anymore and definitely won't be when we get reference-counted types). [ The only slight caveat with doing this is that 'it' would have to be automatically declared in every handler - since the message path is dynamic, it wouldn't be possible to know in advance whether 'it' was needed or not. That being said, 'it' can probably be considered a language feature so this probably makes a lot of sense ].
The reason I thought 'the caller' might make a nice addition to the language is that it helps scripts provide functionality that is more engine-like without depending on the executionContexts (for example, the socket commands tie messages to the object that called the command).
It would also be nice to refashion 'return ... with ...' to set 'it' in the caller (that syntax does exist at the moment, but is only used by libUrl and for no particularly good reason - it was put it to save a string copy IIRC, although that's not really necessary anymore and definitely won't be when we get reference-counted types). [ The only slight caveat with doing this is that 'it' would have to be automatically declared in every handler - since the message path is dynamic, it wouldn't be possible to know in advance whether 'it' was needed or not. That being said, 'it' can probably be considered a language feature so this probably makes a lot of sense ].