Re: [rust-dev] Lifetime notation

2013-01-31 Thread Niko Matsakis
Interesting. That would indeed address the ambiguity issue. Niko Sanghyeon Seo wrote: UtherII on Reddit /r/rust suggested an idea I like: {'lt} T T{'lt} Basically option 8 of http://smallcultfollowing.com/babysteps/blog/2012/12/30/lifetime-notation/ with ' from

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Ziad Hatahet
Would using a dot '.' instead of a quote ' also resolve the ambiguity, without introducing an extra sigil into the language? {.lt}T T{.lt} -- Ziad On Thu, Jan 31, 2013 at 6:33 AM, Benjamin Striegel ben.strie...@gmail.comwrote: +1 to this. Option 8 was always the best-case syntax, and

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Dean Thompson
the dot? Dean From: Ziad Hatahet hata...@gmail.com Date: Thursday, January 31, 2013 6:53 AM To: Benjamin Striegel ben.strie...@gmail.com, Niko Matsakis n...@alum.mit.edu Cc: rust-dev@mozilla.org rust-dev@mozilla.org Subject: Re: [rust-dev] Lifetime notation Would using a dot '.' instead

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Niko Matsakis
...@gmail.com, Niko Matsakis n...@alum.mit.edu mailto:n...@alum.mit.edu Cc: rust-dev@mozilla.org mailto:rust-dev@mozilla.org rust-dev@mozilla.org mailto:rust-dev@mozilla.org Subject: Re: [rust-dev] Lifetime notation Would using a dot '.' instead of a quote ' also resolve

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Lucian Branescu
To: Benjamin Striegel ben.strie...@gmail.com, Niko Matsakis n...@alum.mit.edu Cc: rust-dev@mozilla.org rust-dev@mozilla.org Subject: Re: [rust-dev] Lifetime notation Would using a dot '.' instead of a quote ' also resolve the ambiguity, without introducing an extra sigil into the language? {.lt}T T

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Ziad Hatahet
On Thu, Jan 31, 2013 at 7:11 AM, Dean Thompson deansherthomp...@gmail.comwrote: I expect it would, but at the expense of no longer being able to make as simple a statement in the language tutorial as this: The notation 'foo means a lifetime called foo. To me, it seems nicer for a newbie

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Patrick Walton
On 1/31/13 6:33 AM, Benjamin Striegel wrote: +1 to this. Option 8 was always the best-case syntax, and prefixing an apostrophe on lifetime names is entirely inoffensive. I like this as well. Patrick ___ Rust-dev mailing list Rust-dev@mozilla.org

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Graydon Hoare
On 13-01-31 11:27 AM, Patrick Walton wrote: On 1/31/13 6:33 AM, Benjamin Striegel wrote: +1 to this. Option 8 was always the best-case syntax, and prefixing an apostrophe on lifetime names is entirely inoffensive. I like this as well. As awkward as it is to be a source of direct

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Patrick Walton
On 1/31/13 11:43 AM, Graydon Hoare wrote: On 13-01-31 11:27 AM, Patrick Walton wrote: On 1/31/13 6:33 AM, Benjamin Striegel wrote: +1 to this. Option 8 was always the best-case syntax, and prefixing an apostrophe on lifetime names is entirely inoffensive. I like this as well. As awkward as

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Malte Schütze
On 01/31/2013 08:46 PM, Patrick Walton wrote: On 1/31/13 11:43 AM, Graydon Hoare wrote: On 13-01-31 11:27 AM, Patrick Walton wrote: On 1/31/13 6:33 AM, Benjamin Striegel wrote: +1 to this. Option 8 was always the best-case syntax, and prefixing an apostrophe on lifetime names is entirely

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Dean Thompson
On 1/31/13 12:56 PM, Malte Schütze malte.schue...@fgms.de wrote: I really prefer Foo{'lt}X,Y over Foo'ltX,Y - the former makes it visually clearer to me where each section of the declaration starts and ends. The non-curly choice is Foo'lt,X,Y. How does that grab you? Dean

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Malte Schütze
On 01/31/2013 09:58 PM, Dean Thompson wrote: On 1/31/13 12:56 PM, Malte Schütze malte.schue...@fgms.de wrote: I really prefer Foo{'lt}X,Y over Foo'ltX,Y - the former makes it visually clearer to me where each section of the declaration starts and ends. The non-curly choice is Foo'lt,X,Y. How

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Dean Thompson
Makes sense. One counter point though, which I find more persuasive: the more common case by far is surely a single lifetime parameter and a single type parameter. In which case Foo'lt,X seems less noisy than Foo{'lt}X. Having said that, Graydon gently invoked BDFL rights to push against using

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Martin DeMello
Personally, Foo'lt, 'xy, X, Y, Z is perfectly readable, and far less noisy-looking than having two delimited lists one after another. It will be even more readable with syntax highlighting. If multiple lifetime parameters were really a common thing I might have liked a second separator, maybe

Re: [rust-dev] Lifetime notation

2013-01-31 Thread Gábor Lehel
(Not sure if anyone cares about my opinion, but: if apostrophes are a given, the braces of option 8 aren't obviously preferable to me any more. The appeal of option 8 was that it visually distinguished lifetime parameters, and just overall looked nice, gave the right impression. With apostrophes