Python's has really stupid handling of backslashes, and I really don't like how 
it cannot represent all valid strings. I'd really prefer not to make that same 
mistake.

Ruby's syntax cannot be used because % lexes as an operator.

Of the 3, Lua's is probably the best, although it's a bit esoteric (with using 
[[ and nary a quote in sight). It seems roughly equivalent to C++11's syntax 
though, both in ease of use and flexibility.

-Kevin

On Sep 20, 2013, at 1:41 AM, Andres Osinski <andres.osin...@gmail.com> wrote:

> Out of all the mentioned syntaxes, Python's seems simple and easy (and the 
> corner cases appear to be fairly unlikely for the actual use cases for raw 
> strings), Ruby's seems very powerful and if a couple of restrictions are 
> added could probably fit well, and Lua's seem very well designed by allowing 
> delimiters of arbitrary length.
> 
> As a user of higher-level languages, all of these seem appealing to me. I 
> don't really feel that rawstring should be complicated to use, and I don't 
> really think the limitations are bad so long as they areexplicitly documented 
> (which is how it should be).
> 
> 
> On Fri, Sep 20, 2013 at 5:38 AM, Masklinn <maskl...@masklinn.net> wrote:
> On 2013-09-20, at 10:26 , Marijn Haverbeke wrote:
> >>> If I need to embed both ''' and """ in a string, I'm out of luck.
> >>
> >> The chance of that is as remote as can be. I've never seen or heard of
> >> it happen. And mind, the issue must happen *in a rawstring* which is
> >> even more unlikely.
> >
> > You should note that, as soon as you include something in the language
> > itself, that creates meaningful strings (programs in the language)
> > that include the token, which are not likely, at some point, to need
> > to be written as a multiline string in the language itself.
> 
> It's already noted, my objections are very much that this is highly
> unlikely to be an issue as it only comes to a head when needing
> *triple-quoted rawstrings* to include *their own* delimiters
> (meaning a triple-quoted rawstring which needs to include both
> triple-quoted delimiters at the same time).
> 
> Even unlikelier given python will concatenate string literals during
> parsing.
> 
> On 2013-09-20, at 10:25 , Kevin Ballard wrote:
> > Regular expressions is really the most common application here.
> 
> Right, which was just about all I was saying in the original message.
> 
> > People still use literal path separators in strings all the time in 
> > languages that support path-building methods.
> 
> Something I don't believe should be encouraged.
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
> 
> 
> 
> -- 
> Andrés Osinski
> http://www.andresosinski.com.ar/
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to