As if it would be any less learning with a new string syntax? In either case the user has to come to terms with nonstandard (as in non-C and non-regex) syntax.
My personal belief when it comes to regexps is that it's simpler to live with than to try to improve. For very complicated regexps I think the right way is to use something completely different and only use the cryptic strings for smaller parts. E.g:
Rx.Rx syntactic_ws = Rx.Rx ( Rx.rep (Rx.or ("[ \t\n\r\f\v]", // Ordinary whitespace. "//[^\n]*\n", // Line comments. "/\*([^*]|\*[^/])*\*/" // Block comments. )));
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-21 13:57: Subject: wish: string with other quoting then \
Yes, I remember that discussion. I think it's a problem that could do with a good solution in Pike; but I *would* like to see a string syntax that solves three problems:
- doesn't use \ for in-string quoting
- doesn't need " or ' quoted nor any other regular regexp character
- doesn't need newline quoted and accepts newline in string
These problems are common when using regexps and writing HTML or Pike-writing programs.
If it should be usable for regexps, it should have a fairly short syntax (for instance two leading, two exiting characters), but to be really useful it could be nice with an optional exit string.
I don't think anyone would really like to use a regexp syntax without the 's; it's too widely used and it takes too much energy to relearn.
/ Mirar