Unquoted backslashes for identifier escapes?

Kevin Reid <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
The ::"foo bar" syntax for noun strings is rather ugly and not well- 
justified.

How about, replacing the current noun-string and verb-string, allowing  
backslash escapes in identifiers, which would work uniformly rather  
than being different for nouns and verbs?

That is:

Current                New
::"foo bar"            foo\ bar
c."add(Component)"(d)  c.add\(Component\)(d)

Actually, I can think of one disadvantage already: the quote syntax  
permits the empty string, whereas backslashes need at least one  
character to escape. Not that it's *sensible* to use the empty string  
for an identifier, but the regularity is good.

Common Lisp uses essentially this approach for symbol names -- the  
escaping is uniform -- but it has a "multiple escape" which is  
essentially quotes:

add\(Component\)   single escape
|add(Component)|   multiple escape
||                 empty-string-named symbol using multiple escape

What comes to mind to have such a syntax in E is:

\"foo bar"
\"add(Component)"
\""

But that is rather peculiar and inconsistent with other uses of  
backslash.

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.