Function name for doing WITH or IN a context
We want to be able to easily evaluate a block in the context of a specific object.
Gregg suggested the word WITH, as in:
with object [a: 10 ....]
That is a good suggestion, similar to VID2 usage of WITH.
I also suggested IN, mainly because I did not want to add a new word...
in object [a: 10 ....]
But, that does make IN do two things that are related, but not identical. (Word bind, and bin block plus evaluate it).
Another option is to write:
do in object [a: 10 ....]
Now IN is consistent, but that's more to type, and programmers don't like typing.
We could also have:
do/in object [...]
But, it's more problematic: 1) it reverses the DO arg order, 2) it slows down DO for everything, just a tiny tiny bit.
Comments?
12 Comments
|