why can't I "decide on nothing"?

Hi. I’m confused again.

To me it seems that “decide on nothing” would be a perfectly sane way for a “to decide” phrase to say that it is unable to find something to decide on, just like a rule is allowed to “make no decision”.

Currently I’m just playing around with some rpg-inspired stuff (in particular, inspired by S. John Ross’s Risus. So I have this

to decide which cliche is the used cliche of (hero - a person) as (possible - a list of cliches):
	repeat with C running through possible:
		let L be the dice of hero as C;
		if L > 0, decide on C;
	decide on the nil cliche; 

I’m just sketching, if I ever release this it will look better. So this is checking a list to see which of the items is appropriate, and sometimes the correct answer is that none of them are. But you can’t “decide on nothing” - it does compile, but it throws a runtime problem (“P33: attempt to decide on nothing”. Duh!). Can you catch these problems?

Is there some better way of doing this than using a “typed null” object like I do here (defining “the nil cliche is a cliche”)?

Or am I doing things totally backwards? Should I be using something else than a to decide phrase here?

“Nothing” is basically just a “typed null” value for “things” specifically (note that it doesn’t work for “objects” – you can’t use nothing as a room, for example). Unfortunately, it seems you’re not allowed to decide on it. I’m not quite sure why that restriction exists, but obviously if your phrase (“To decide which…:”) is returning something that isn’t a thing (i.e. if a “cliche” is not a kind of “thing”), then deciding on “nothing” really doesn’t make sense anyway since it’s of the wrong kind.

In short, yes, you should used typed-nulls like that.

Of course. Silly: My cliches are objects, not things. I assumed nothing was an object, not a thing. Ok, thanks!

Unless you changed it since the last time you posted on the forums with the definition, I think I remember that your cliches were values. Anyway, you could make a cliche of “none” (or better yet “no cliche”) and make that default.

Actually, this is backwards. “Decide on nothing” is valid only if you are returning an object, not a thing:

To decide which object is nada: decide on nothing.

Since a thing is a subtype of the object kind, you can often use a phrase that returns an object even if what you are really after is a thing, e.g.:

[code]Test is a room. The player carries a staff.

To decide which object is (X - an object) mystified:
if X is the player, decide on the player;
decide on nothing.

When play begins:
say “With your staff you mystify [the staff mystified].”[/code]

Oh, I guess I was wrong about that… Sorry!