Skip to content

Compatibility

SharpMUSH does away with some of the more unique aspects of PennMUSH parser curiosities.

Unbalanced Parenthesis

In PennMUSH, the following is legal, while is not in SharpMUSH:

PennMUSH
think add(1,2
> 3

Instead, complete the parenthesis.

SharpMUSH
think add(1,2)
> 3

Forgiving Parenthesis

In PennMUSH, the following is legal, while is not in SharpMUSH:

PennMUSH
lsearch(all,eval,\[strmatch(##,%#)\])
> #1

Instead, escape all the contents. This is also needed for #lambda evaluation.

SharpMUSH
lsearch(all,eval,\[strmatch\(##\,%#\)\])
> #1

Full Recursion Parsing

In PennMUSH, TinyMUX, etc, you can do the following:

PennMUSH
&fn me=ucstr; think [v(fn)](foo)
> FOO

Instead, use callfn() to call the intended function.

SharpMUSH
&fn me=ucstr; think callfn(v(fn),foo)
> FOO

This is an awesome feature of MUSH-likes, but we explicitly do not support this, as it makes the parser non-deterministic, ambiguous and harder to maintain. Most existing Softcode does not rely on this behavior however.

## Double-Evaluation

In PennMUSH, ## inside iter() performs double-evaluation, meaning the substitution result is evaluated again as MUSHcode:

PennMUSH
iter(\[if(true\,red\,white)\],##,)
> red

In SharpMUSH, ## is substituted as %iL (a literal reference), so the result is returned as-is without further evaluation:

SharpMUSH
iter(\[if(true\,red\,white)\],##,)
> [if(true,red,white)]

If double-evaluation is needed, use s() or objeval() to explicitly evaluate the result.