+1 for the 'lt syntax, it's the first suggestion that I haven't found
difficult to visually parse.
Also it's easier to distinguish from other constructs, since it's not
overloading another common symbol.

I also think the `.lt` option is pretty (actually more so, personally), but
could see the dot being more confusing because at first glace it looks
similar to accessing a struct field: &.lt, whereas &'lt is obviously
different, so less chance for confusion.

I'd be happy with either of these options.


On Thu, Jan 24, 2013 at 8:00 AM, Niko Matsakis <n...@alum.mit.edu> wrote:

> It's a tough balancing act.  Sigils are bad but then if things are too
> concrete that's bad too.
>
> The slashes are visually hard to parse, I think everyone agrees.  Imagine
> this: `&a/B/c/d/e`.  That would be a legal type under that proposal and I
> think it's pretty darn confusing vs `&'a B<'c, 'd, 'e>`
>
> I'm really starting to like the 'lt notation, I have to say.
>
>
> Niko
>
>
> Paul Nathan wrote:
>
> My general 2c, worthless as it might be:
>
> One of my criticisms of perl when I use it is that my cats could sit on
> the keyboard and produce correct code.
>
> Sigil heavy code produces IMO a heavy mental burden. There is the popular
> c++ quiz question 'what does this syntax bundle do'.  It's really quite
> pointless and just a puzzle IMO. Mostly a mental exercise to prove
> something.....
>
> I'd like not to endure that with Rust.
>
> Lifetime-qualifier/variable seems to be reasonable:  I'd suggest further
> information could be stacked up with /s as
>
> Info/lifetime/variable
>
> Or
>
> Type/info/lt/variable
>
> Etc. I write lisp a lot and if verbosity is onerous, a macro can be
> written to shorten it. I presume/hope rust's macros are sufficient to that
> task.
>
> I think it's better to opt for obvious and lengthy at first and then allow
> power users to use shortcuts. Too many sigils is confusing to the
> uninitiated.
>
>
> Regards,
> Paul Nathan
>
> Sent from my iPhone
>
> On Jan 23, 2013, at 1:44 PM, Niko Matsakis <n...@alum.mit.edu> wrote:
>
>
>
> Dean Thompson wrote:
>
> Personally, though, I find myself increasingly attracted to the idea of
> having a consistent notation for writing a lifetime everywhere one
> appears, independently of the & symbol. (*/lt/* is the only such notation
> I've found yet that seems reasonable.)
>
>
> I like this idea too, I just don't like /lt/ for that role.
>
> Maybe `'`? (shades of ML)
>
>     &'lt Foo
>     Foo<'lt>
>
> That actually doesn't look half bad to me.
>
> Maybe `.`?
>
>     &.lt Foo
>     Foo<.lt>
>
> I don't like Foo<.lt>, but &.lt Foo and Foo<lt> might be ok, though it
> doesn't adhere to the principle (in that lifetime names are just like any
> other identifier).
>
> Another option:
>
>     &{lt} Foo
>     Foo<{lt}>
>
> But the latter form feels pretty sigil heavy.
>
>
> Niko
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to