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
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
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
...@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
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
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
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
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
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
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
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
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
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
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
(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
15 matches
Mail list logo