More expressive language extensions


#1

One issue with using procedural macros to implement more aggressive changes to the Rust language is that macros are inherently local. There was some discussion in the past of enabling more direct customization of the compiler, e.g. here.

I’m wondering, now that procedural macros have landed, is there any chance of this being on the table again? If it is I’d be happy to write a Rust 2019 post about what I’d use it for if it were available.


#2

(Caveat: I’m not on any of the teams that have a say in this, just an interested community member.)

I’d say that, if you have a compelling enough use case, it will definitely on the table. Prioritization will depend on how compelling your use case is, though I probably wouldn’t hold my breath. As with anything, there will be a cost-benefit analysis and unless you bringing your own compiler engineering force, your idea will be competing against a great many interesting others.

That said, I think you should still write some version of your Rust 2019 blog post – I, at least, will be interested to read it!


#3

I have not tried it but there is a tool called rerast to refactor rust projects using user defined rules.

One could imagine hacking it to implement rule-based compiler extensions as an alternative to genuine language support.


#4

Posted here: Rust 2019: Towards Richer Language Extensions


#5

Link seems dead.


#6

Apparently got flagged as spam, waiting for staff to approve it.