featherweight musings
  • Home
Nick Cameron

Nick Cameron

40 posts •
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

Nick Cameron Nick Cameron
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

Nick Cameron Nick Cameron
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

Nick Cameron Nick Cameron
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

Nick Cameron Nick Cameron
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,

Nick Cameron Nick Cameron
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

Nick Cameron Nick Cameron
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

Nick Cameron Nick Cameron

Macros in Rust pt4

Previously: intro, macro_rules, procedural macros, hygiene. This post is a grab-bag of stuff that didn't fit elsewhere. First, I'll discuss some more macro_rules stuff around import/export/modularisation of macros. Then

Nick Cameron Nick Cameron
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

Nick Cameron Nick Cameron

Macros in Rust pt2

(Continuing from last time). procedural macros Also known as syntax extensions or syntax plugins or compiler plugins (which they are just a category of). I'll not get into the naming thing here, but

Nick Cameron Nick Cameron

Macros in Rust pt1

In the last blog post I introduced macros and some general issues. In this post I want to describe macros (and other syntactic tools) in Rust. In the next instalment, I'll go into

Nick Cameron Nick Cameron

Design patterns in Rust

Design patterns are "general reusable solutions to a commonly occurring problem within a given context in software design". Design patterns are a great way to describe some of the culture and

Nick Cameron Nick Cameron
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

Nick Cameron Nick Cameron

Rustfmt-ing Rust

Rustfmt is a tool for formatting Rust code. It has seen some rapid and impressive development over the last few months, thanks to some awesome contributions from @marcusklaas, @cassiersg, and several others. It

Nick Cameron Nick Cameron

New blog

This is my new blog location. Congratulations on finding it! This blog was previously at http://featherweightmusings.blogspot.com and you should check there for the archives.

Nick Cameron Nick Cameron
featherweight musings © 2018
Latest Posts Twitter Ghost