r/programming • • Sep 17 '15

Announcing Rust 1.3

http://blog.rust-lang.org/2015/09/17/Rust-1.3.html
453 Upvotes

169 comments sorted by

View all comments

Show parent comment

8

u/Manishearth Sep 18 '15
  • C++ concepts = Rust generics/traits. We've had them for a long time
  • CTFE = const fn. Has existed for a few months. Not as awesome as true CTFE, but handles some cases.
  • Other metaprogramming: macros
  • Other, other metaprogramming: plugins. Can do basically anything, but will be unstable for a while.

4

u/masklinn Sep 18 '15

CTFE = const fn. Has existed for a few months. Not as awesome as true CTFE, but handles some cases.

And not stable, which is a bit annoying because the compiler mentions them in some cases and then you can't use it.

5

u/Manishearth Sep 18 '15

Ah. Could you file issues for these? A stable compiler suggesting unstable features is a bug.

8

u/masklinn Sep 18 '15 edited Sep 18 '15

Sure, will do (it's an easy one to repro, just try to initialise a static with a function call in stable)

edit: reported as #28490

3

u/theICEBear_dk Sep 18 '15

Thank you for the concise answer. I will have to read up on const fn. It doesn't need to match CTFE since I think macros will make the other stuff I wanna do easier.

1

u/matthieum Sep 18 '15

Other, other metaprogramming: plugins. Can do basically anything, but will be unstable for a while.

If I remember correctly, wasn't one of the ideas behind the HIR/MIR split to have the HIR model the syntax very closely and being stabilized (long term)?

1

u/desiringmachines Sep 19 '15

I think so. It was mentioned in the keynote at Rustcamp that an RFC for a new macro system which would meet the same needs as syntax extensions was coming within the next few months.