Escapism

Escaping is a popular encoding technique to avoid using certain characters which are not permissible. XML and JSON make extensive use of this.

Let's take the perl language as an example. In an intelligent perl string you need to escape a dollar sign with a backslash so it is actually intended as a dollar sign, not as an indicator that you would like to have a $variable replaced by its value.

JSON also uses backslashes whereas in XML escapings are introduced with an ampersand.

PSYC tries to avoid escapings in its syntax as much as possible, that's why the syntax looks a bit funny. The only character that really needs escaping is the newline marker. To avoid even that we have added length-prefixed variables and lists.

This is intended to make processing and implementation of the protocol easier and faster.

PSYC can be almost as efficient as a binary protocol, yet it is extensible, test-friendly and debuggable like plain-text protocols should be. The best of both, really.

See also Wikipedia:Escape character.