digitalmars.D - [OT] Lifetime elision proposal in Rust (& regex macro)
- Nick Treleaven (12/12) Jun 30 2014 Hi,
- Ary Borenszweig (2/15) Jun 30 2014 What are those 'a all over the place? I never understood them :-(
- Brian Rogoff (13/19) Jun 30 2014 Those are lifetimes, which are a part of the Rust type annotation
- Elvis Zhou (2/22) Jul 01 2014 I like this rustbyexample.com, is there a dbyexample.com?
- Brian Rogoff (8/9) Jul 01 2014 Nothing that I know of that's exactly the same, but I'm quite
Hi, This recent proposal looks like it might clean up typical Rust function signatures significantly: https://github.com/aturon/rfcs/blob/lifetime-elision/active/0000-lifetime-elision.md Some discussion here: http://www.reddit.com/r/rust/comments/298j3y/question_about_lifetime_parameters/ciig6ol I thought it might be interesting, and perhaps relevant for D (e.g. scope or ref returns?). In older news, Rust has syntax extensions, which are used for compile-time regex compilation: http://doc.rust-lang.org/regex/index.html#the-regex!-macro These two developments seem to be making Rust a bit more competitive with D.
Jun 30 2014
On 6/30/14, 1:50 PM, Nick Treleaven wrote:Hi, This recent proposal looks like it might clean up typical Rust function signatures significantly: https://github.com/aturon/rfcs/blob/lifetime-elision/active/0000-lifetime-elision.md Some discussion here: http://www.reddit.com/r/rust/comments/298j3y/question_about_lifetime_parameters/ciig6ol I thought it might be interesting, and perhaps relevant for D (e.g. scope or ref returns?). In older news, Rust has syntax extensions, which are used for compile-time regex compilation: http://doc.rust-lang.org/regex/index.html#the-regex!-macro These two developments seem to be making Rust a bit more competitive with D.What are those 'a all over the place? I never understood them :-(
Jun 30 2014
On Monday, 30 June 2014 at 17:28:06 UTC, Ary Borenszweig wrote:On 6/30/14, 1:50 PM, Nick Treleaven wrote:Those are lifetimes, which are a part of the Rust type annotation machinery. The syntax is borrowed (pun intended ;-) from ML family languages, which use type variables like 'a, 'b, 'c (pronounced "alpha", "beta", "gamma", or "tick a", tick b", "tick c") to express parametric polymorphism. Rather than try to explain Rust's lifetimes, I'll point you here http://rustbyexample.com/lifetime.html Rust is still undergoing development, and the lifetime syntax is a bit noisy, so it may change, but the rustbyexample page has been following the Rust nightly builds closely. It's an interesting language, and the Mozilla backing really helps it, but I find D and Nimrod easier to use right now.Hi, This recent proposal looks like it might clean up typical Rust functionWhat are those 'a all over the place? I never understood them :-(
Jun 30 2014
On Monday, 30 June 2014 at 17:47:11 UTC, Brian Rogoff wrote:On Monday, 30 June 2014 at 17:28:06 UTC, Ary Borenszweig wrote:I like this rustbyexample.com, is there a dbyexample.com?On 6/30/14, 1:50 PM, Nick Treleaven wrote:Those are lifetimes, which are a part of the Rust type annotation machinery. The syntax is borrowed (pun intended ;-) from ML family languages, which use type variables like 'a, 'b, 'c (pronounced "alpha", "beta", "gamma", or "tick a", tick b", "tick c") to express parametric polymorphism. Rather than try to explain Rust's lifetimes, I'll point you here http://rustbyexample.com/lifetime.html Rust is still undergoing development, and the lifetime syntax is a bit noisy, so it may change, but the rustbyexample page has been following the Rust nightly builds closely. It's an interesting language, and the Mozilla backing really helps it, but I find D and Nimrod easier to use right now.Hi, This recent proposal looks like it might clean up typical Rust functionWhat are those 'a all over the place? I never understood them :-(
Jul 01 2014
On Tuesday, 1 July 2014 at 15:06:27 UTC, Elvis Zhou wrote:I like this rustbyexample.com, is there a dbyexample.com?Nothing that I know of that's exactly the same, but I'm quite happy with http://ddili.org/ders/d.en/, and I'm anxiously awaiting that last 5% or so being translated. It's author, Ali Cehreli, is a frequent and helpful contributor to this forum. It has lots of examples that you can type in and run, so it should be close enough to rustbyexample. Maybe a "Learn D The Hard Way" a-la Zed Shaw would also be nice.
Jul 01 2014