The code below does not work in Inform 7, because Inform sees the first “is” in the “author” sentence and grabs it. This is perfectly reasonable compiler behavior.
a book is a kind of thing. a book has text called author. There is a book called The Heart is a Lonely Hunter. author of The Heart is a Lonely Hunter is "Carson McCullers."
Now I can work around this with
author of Lonely Hunter is "Carson McCullers"
and I’m perfectly fine with that.
But it would be nice to be able to have the full name in the source, for general aesthetics, and also so I am sure namespaces don’t clash. (e.g. I could see myself getting lazy and calling it Heart, which might clash with Conrad’s Heart of Darkness. Or–and, yes, this would be bad design–if there were an ACTUAL lonely hunter in the game, things would get very sticky indeed.)
And I don’t want to make it privately-named, because then I’d need to do
hialh is a privately-named book. printed name of hialh is "The Heart is a Lonely Hunter". understand "heart is a lonely hunter" and "lonely hunter" and "lonely/hunter" as hialh.
I’ve also tried things like putting the full book title in parentheses. Syntax like “if Hostile is He Lot is touchable” has no problems compiling and does what I’d expect. But with definitions outside of a rule, I can’t get the syntax to work.
Is there any way to allow for the full variable name easily? Saying "if hostile is he lot is
Actual not-so-simple full usage case enclosed, for the curious
For the one anagram game I wrote, there is an NPC called the Hostile-is-He Lot. I recently removed the hyphens to get rid of understand “hostile/is/he” code, which created compiling problems I worked around by calling it the He Lot elsewhere…
I wanted to be able to still easily test that the anagram clues were right, e.g. that the hinting device properly compared HOSTILE and IS HE LOT to HOLIEST. I have a python script that looks for and checks lines such as:
cheat-a-text of he lot is "RYRYYRR". cheat-b-text of he lot is "??RYYR?". [the question marks, if you're curious, are because the first letters of Hostile and Is He Lot alternately do and don't match up with the solution, Holiest.)
Then I calculate if the cheat-text is what it should be. (Writing this into a routine comparing clue-text and answer-text is possible, but 1) it’d require a huge rewrite and 2) Inform is a bit slow with regexes and text comparisons.) Having the full name in the source test is easiest. It seems there should be a way. (I suppose, if I really wanted to, I could write this in Inform 6 code.) But there is also not a bad workaround. My python scripts could define this stub:
def actual_name(x): return alternate_name[x] if x in alternate_name else x alternate_name["he lot"] = "hostile is he lot"
But all the same, it’d be nifty if I didn’t have to.
I wanted to check if I was missing something.
This may be a bit of a nitpick, but I hope this is an interesting or useful general question brought up from my specific problem.