google / CodeCity

Google's Code City is a social programming environment. It offers a comic book inspired virtual world where programmers can write code collaboratively.
https://codecity.world/
Apache License 2.0
186 stars 38 forks source link

Allow more specific dobjspec, iobjspec #395

Open cpcallen opened 4 years ago

cpcallen commented 4 years ago

LambdaMOO (and, at the moment, CodeCity) provide exactly three options for dobjspec and iobjspec: none, which disallows a direct or indirect object respectively; this, which must match the object the verb is on; and any, which allows any text (or none) at all.

In many cases—e.g, $.container.put any in this, we'd actually like to constrain 'any' a bit. The obvious constraint is that it unambiguously match a single $.physical object; the proposed name for this option is "something".

We might wish to be even more general, and allow any .dobj and .iobj to be set to $.physical object, with the verb matching if dobjstr and/or iobjstr are instances of that prototype—so, e.g., a lock could have $.lock.unlock this with $.key.

cpcallen commented 4 years ago

Thinking more about this and about parsing in general:

The entire verb section of the Function tab—unlike the rest of the editor (except for SVG restrictions)—is really specific to an English-language, MUD-style UI. If this section could be served up by the database (rather than from static/) then it would give us a lot more flexibility to implement these kinds of changes in future.