[Edit: This opinion is mostly off-base in a general sense, but I’ll leave it here as a point-of-interest for those using the Modified Timekeeping extension; this thread is only accurate/specifically applicable in those circumstances]
In my opinion, there is a large problem with the way Instead statements are often portrayed in the documentation, as well as a large amount of the example code offered.
Insteads don’t take a turn. Carry out does. This isn’t very clear unless you’re well-versed in Inform, and there is a lot of Instead “abuse” which seemingly works fine unless you have a story which depends on turn timing. I think it should be highlighted more often that Insteads are powerful, yet “dangerous” because they are so easy to misuse. It is very easy to use them in the wrong context and get the right result, yet behind the scenes things aren’t operating as they should.
Examples? Here’s something someone might suggest using an Instead for, and (in my opinion) it is improper coding.
Instead of eating the apple:
say "[The noun] is simply delicious. Its juices run down [our] chin with every bite.";
now the apple is off-stage.
Does that work to provide flavor (no pun intended) text to eating a specific item? Yep. Does it seem to work perfectly in this circumstance? Yep. Does it work properly insofar as actions are designed to be implemented. Nope.
If you’re trying to do something like this, then it would be more proper to do something like:
[code]A fruit is a kind of thing.
An apple is a fruit. A pear is a fruit.
Carry out eating a fruit:
now the noun is off-stage.
Report eating a fruit:
“[The noun] is simply delicious. Its juices run down [our] chin with every bite.”[/code]
Forgive me if my examples aren’t coded 100% correctly, but you get the idea.
The Instead is an ungraceful kludge that kind of works, but breaks a turn-based game. The second implementation is actually how you should do it, if you want to do it properly. Using Insteads instead of Carry Out/Report has little or nothing to do with generalities versus one-offs and exceptions, and everything to do with what you’re really trying to accomplish, regardless of what the documentation or other people may teach. I feel like people just say to use Insteads because they are convenient in cases like this, but I think that’s setting people up for failure.
A proper use of Instead would be something like:
Instead of going nowhere when location is Thick Jungle:
say "[We] have no inclination to bushwhack [our] way through the entire jungle."
That’s the negation of an action (which doesn’t take a turn because it shouldn’t be followed through with, period) and works similarly to a parser error, so Instead is okay to use here.
I don’t mean this to sound like arrogant soap-boxing, and I’m sure this isn’t any revelation to any of the regulars here but it’s something I think is glossed over and the subtleties are lost to anyone that hasn’t spent a significant amount of time coding Inform.
Am I right? If anyone thinks I’m off-base with this opinion, please do let me know; my understanding of Inform is constantly evolving.