Menu

#148 Ship names drive client writers nuts

open
nobody
None
5
2004-02-27
2004-02-27
No

A ship name can be anything. This makes parsing of
output unnecessary hard. For instance:

Byzantium bombs did 66 damage to bb battleship (#1)
at 6,2

Name the ship `(#2) at -4,0', and you get

Byzantium bombs did 66 damage to bb battleship (#2)
at -4,0 (#1) at 6,2

I suggest to make printed ship names reliably match a
regular expression:

* Either outlaw `(' and whitespace in ship names;
regexp /[^( \t]*/

* Or outlaw `"', and print in `"'; regexp /"[^"]*"/

* Or print `"' only around `funny' names, still outlaw
`"'; regexp /[-a-z_A-Z0-9]*|"[^"]*"/

Discussion


Log in to post a comment.

MongoDB Logo MongoDB