Mozilla Macros and name resolution This should be the last blog post on the future of macros. Next step is to make some RFCs! I've talked previously about how macros should be nameable just like other items, rather
Mozilla Closures and first-class functions I wrote a long and probably dull chapter on closures and first-class and higher-order functions in Rust. It goes into some detail on the implementation and some of the subtleties like higher-ranked lifetime
Mozilla Libmacro As I outlined in an earlier post, libmacro is a new crate designed to be used by procedural macro authors. It provides the basic API for procedural macros to interact with the compiler.
Mozilla A type-safe and zero-allocation library for reading and navigating ELF files Over the Christmas break I made a start implementing an ELF library in Rust. This was interesting for me since I've not done a lot of library work before. I hope it will
Mozilla Abstract return types, aka `impl Trait` There has been an idea around for a long time that we should allow functions to specify bounds on their return types, rather than give a concrete type. This has many benefits -
Mozilla My thoughts on Rust in 2016 2015 was a huge year for Rust - we released version 1.0, we stabilised huge swathes of the language and libraries, we grew massively as a community, and we re-organised the governance
Mozilla Procedural macros, framework In this blog post I'll lay out what I think procedural macros should look like. I've discussed the syntax elsewhere, and I'll discuss the API we make available to procedural macros in a
Mozilla Macro plans - syntax I would like to improve the syntax for both macros by example and procedural macros. For macros by example, there is a soft backwards compatibility constraint: although new macros do not have to
Mozilla Sets of scopes macro hygiene On the first day, God created programming languages, and he saw that they were good. On the second day, he saw that there were expressivity problems and he created macros. On the third
Mozilla Macro hygiene in all its guises and variations Note, I'm not sure of the terminology for some of this stuff, so I might be making horrible mistakes, apologies. Usually, when we talk about macro hygiene we mean the ability to not
Mozilla Macro plans, overview In this post I want to give a bit of an overview of the changes I'm planning to propose for the macro system. I haven't worked out some of the details yet, so
Mozilla Macros pt6 - more issues I discovered another couple of issues with Rust macros (both affect the macro_rules flavour). Nested macros and arguments These don't work because of the way macros do substitution. When expanding a macro,
Mozilla concat_idents! and macros in ident position In the next few blog posts I want to cover some areas for improvement for Rust macros. I'll drill down into one topic at a time. I'll propose solutions, but not in RFC-levels
Mozilla Macros in Rust pt5 I've previously laid out the current state of affairs in Rust (0, 1, 2, 3, 4). In this post I want to highlight what I think are issues with the current system and
Mozilla Macros in Rust pt3 Previously I covered macro_rules and procedural macros. In this post I'll cover macro hygiene in a bit more detail. In upcoming posts, I'll cover modularisation for macros, some implementation details, some areas
Mozilla Macros We're currently planning an overhaul of the syntax extension and macro systems in Rust. I thought it would be a good opportunity to cover some background on macros and some of the issues