I would also find it valuable to have a particular sigil for lifetimes, as there is for the various pointers.
On 31 January 2013 15:11, Dean Thompson <[email protected]> wrote: > 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 to wonder "how is that lifetime being > used?" than to wonder "what's that thing after the dot?" > > Dean > > From: Ziad Hatahet <[email protected]> > Date: Thursday, January 31, 2013 6:53 AM > To: Benjamin Striegel <[email protected]>, Niko Matsakis < > [email protected]> > Cc: "[email protected]" <[email protected]> > 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{.lt} > > > -- > Ziad > > > On Thu, Jan 31, 2013 at 6:33 AM, Benjamin Striegel <[email protected] > > wrote: > >> +1 to this. Option 8 was always the best-case syntax, and prefixing an >> apostrophe on lifetime names is entirely inoffensive. >> >> >> On Thu, Jan 31, 2013 at 8:58 AM, Niko Matsakis <[email protected]> wrote: >> >>> 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/<http://smallcultfollowing.com/babysteps/blog/2012/12/30/lifetime-notation/> >>>> with ' from https://mail.mozilla.org/**pipermail/rust-dev/2013-** >>>> January/002942.html<https://mail.mozilla.org/pipermail/rust-dev/2013-January/002942.html> >>>> >>>> This does need a lookahead but as far as I can tell unambiguous and >>>> manageable. More on: >>>> http://www.reddit.com/r/rust/**comments/17ka3b/meeting_** >>>> weekly_20130129_region_syntax_**impl_type/c86t7wg<http://www.reddit.com/r/rust/comments/17ka3b/meeting_weekly_20130129_region_syntax_impl_type/c86t7wg> >>>> ______________________________**_________________ >>>> Rust-dev mailing list >>>> [email protected] >>>> https://mail.mozilla.org/**listinfo/rust-dev<https://mail.mozilla.org/listinfo/rust-dev> >>>> >>> ______________________________**_________________ >>> Rust-dev mailing list >>> [email protected] >>> https://mail.mozilla.org/**listinfo/rust-dev<https://mail.mozilla.org/listinfo/rust-dev> >>> >> >> >> _______________________________________________ >> Rust-dev mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/rust-dev >> >> > _______________________________________________ Rust-dev mailing list > [email protected] https://mail.mozilla.org/listinfo/rust-dev > > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev > >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
