Re: [rust-dev] RFC: Syntax for "raw" string literals

2013-09-23 Thread Steven Ashley
I also forgot to mention the possibility of putting a filename as the eos string. I think its kind of neat. r##index.html##" ... "##index.html## ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

Re: [rust-dev] RFC: Syntax for "raw" string literals

2013-09-23 Thread Steven Ashley
I'm a fan of always having the r prefix. Its more consistent and it leaves #foo available for another language feature if required. Otherwise I like it. I've tweaked the regex I posted slightly to ensure that the # tokens are well balanced. See it on regexpal [1]. [rR](#*)([^#"]*|#)\1"(.*?)"\1\2\

[rust-dev] RFC: Syntax for "raw" string literals

2013-09-22 Thread Steven Ashley
I'm in favour of C++11 syntax. On Monday, September 23, 2013, Steven Ashley wrote: > Oh right, that's fair enough. I think the indentation/escaping issues can > be fixed however the new line issues you mentioned will still exist for > strings split over multiple lines using th

[rust-dev] RFC: Syntax for "raw" string literals

2013-09-22 Thread Steven Ashley
; would just say that it would be nice to pick such syntax for raw strings > that allows for both single line raw strings and multi-line raw strings to > be represented easily. > On Sep 22, 2013 1:00 PM, "Steven Ashley" wrote: > >> Hi everyone, >> >>

Re: [rust-dev] RFC: Syntax for "raw" string literals

2013-09-22 Thread Steven Ashley
Hi everyone, Have we considered syntax similar to Ruby style heredocs? I particularly like the light looking syntax. - The indentation of the block is determined by the indentation of the eos marker. Keeping code flow natural. < wrote: > > Of the 3, Lua's is probably the best, although it's a b

Re: [rust-dev] Redesigning fmt!

2013-07-29 Thread Steven Ashley
On 29/07/2013 6:36 AM, "Graydon Hoare" wrote: > > On 13-07-28 04:06 PM, Steven Ashley wrote: > >> {0:( >>if count == 0 then (You have no messages.) >>else (You have {count:#} messages.) >> )} > > > That's exactly the case that

[rust-dev] Redesigning fmt!

2013-07-28 Thread Steven Ashley
On Sunday, July 28, 2013, Brian Anderson wrote: > > I'm not a fan of printf-style format specifiers in general, largely > because the specifiers have to be allocated in some way (fmt attribute) so > are not particularly extensible. I can't imagine how this fmt attribute can > be implemented in a ge

Re: [rust-dev] Renamed print/println

2013-07-15 Thread Steven Ashley
A possible use case for printfln may be to ensure that a new line is always written in the case where the format string comes from a .po file and is translated into many different languages. ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozi

Re: [rust-dev] bikeshedding println() and friends

2013-07-15 Thread Steven Ashley
On Monday, July 15, 2013, Bennie Kloosteman wrote: > Note C# does have format strings it uses {0} , {1} for the params since > the compile knows the type anyway ...seems a lotr smarter to me... when you > want to do more extensive format these days you have to take linguistic > formats it to accou

Re: [rust-dev] bikeshedding println() and friends

2013-07-14 Thread Steven Ashley
On Sunday, July 14, 2013, Benjamin Striegel wrote: > I think Jack's proposal is fine, but as Bennie notes I think it's still > worth discussing whether C#-style formatting would be a better fit for us > than C-style formatting. > C# style formatting has the (dis?)advantage that it is possible to

Re: [rust-dev] should '///' be a doc comment?

2013-05-02 Thread Steven Ashley
On Thu, May 2, 2013 at 1:50 PM, Erik S wrote: > John, > I would suggest requiring *exactly* three slashes for a doc comment (or > *exactly* two stars for a /** -- */ style doc comment). This matches > with Doxygen's parsing (I think), and makes both the examples below > parse correctly. > > Erik

Re: [rust-dev] const, static, global, mut, syntax!

2013-03-16 Thread Steven Ashley
'glob' is a term usually associated with text matching. I think using 'glob' for 'global' would be confusing. On Mar 17, 2013 12:42 PM, "Marvin Löbel" wrote: > On 'static' vs 'global': > - 'static' would feel more familiar for C/C++ people, but is also way to > overloaded there. > - 'global' woul