Message from discussion
RfD: Escaped Strings
Path: g2news2.google.com!news1.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsgate.cistron.nl!xs4all!amsnews11.chello.com!amsnews14.chello.com!amstwist00.POSTED!53ab2750!not-for-mail
From: m...@iae.nl (Marcel Hendrix)
Subject: Re: RfD: Escaped Strings
Newsgroups: comp.lang.forth
Message-ID: <02813424133560@frunobulax.edu>
References: <13if7ovia4en139@corp.supernews.com>
X-Newsreader: iForth 2.0 console (October 21, 2006)
Lines: 29
Date: Wed, 31 Oct 2007 21:42:53 +0200
NNTP-Posting-Host: 80.56.233.9
X-Complaints-To: abuse@chello.nl
X-Trace: amstwist00 1193863368 80.56.233.9 (Wed, 31 Oct 2007 21:42:48 MET)
NNTP-Posting-Date: Wed, 31 Oct 2007 21:42:48 MET
Peter Knaggs <pkna...@bournemouth.ac.uk> wrote Re: RfD: Escaped Strings S\" (version 5)
[..]
> Translation rules:
> Characters are processed one at a time and appended to the
> compiled string. If the character is a '\' character it is
> processed by parsing and substituting one or more characters
> as follows, where the character after the backslash is case
> sensitive:
> \a BEL (alert, ASCII 7)
[..]
> \\ backslash itself
> \ An ambiguous condition exists if a \ is placed before any
> character, other than those defined in 6.2.xxxx S\".
[..]
Why was it necessary to make this an ambiguous condition?
S\" is not used by any systems not represented in the Forth 200x effort.
IMHO it is a bit silly (for a standards effort) not to mention all \<char>
codes in use today, and/or to allow future vendor-specific extensions that
will break portability of code and require work-arounds.
A general solution could be to require that a deferred (and standardized)
hook word is executed in case an unknown code is encountered. This would
guarantee that any future S\" problems can be fixed by user code.
Thinking this through should convince most people that simply forbidding
non-standard \-codes is by far preferable.
-marcel