On 2013-07-29, at 11:04 , Huon Wilson wrote: > On 29/07/13 18:26, Masklinn wrote: >> I don't have much to say, but >> >> On 2013-07-29, at 06:24 , Alex Crichton wrote: >>> * Any argument can be selected (0-indexed from the start) >> keyword/named selection is *really* great for longer/more busy patterns, >> it makes format string much more readable both in-code and for >> translators (who usually lack part of the context, even with comments, >> especially if they are non-technical). I think this is one of the great >> strengths of Python's string formatting (both C-style and C#-style) or >> Ruby's string interpolation, and if the formatting language is going >> to be reworked away from C-style formats it would be nice to include >> it if possible. >> >> I don't think it can be integrated directly into the current grammar >> though, as there'd be ambiguity with the function spec. >> _______________________________________________ >> Rust-dev mailing list >> Rust-dev@mozilla.org >> https://mail.mozilla.org/listinfo/rust-dev > > fmt! is a syntax extension (which receive their arguments as tokens, not at > all parsed), so it can actually "define" its own syntax for named arguments, > without any modifications to Rust's grammar (as long as it tokenises)
I was talking about the fmt! syntax described by Alex here, not Rust's grammar. _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev