- Title: Enhanced Variable Printing in println! and dbg! Macros
- Author(s): bionicles with help from Mistral Au Large & codestral
- Iteration: 2
- Status: Draft
Abstract: This RFC proposes a new shorthand syntax for Rust's println! and dbg! macros, inspired by Python's f-string {x=} syntax. The goal is to reduce redundancy and improve ergonomics when printing variables and their values, especially for long or nested identifiers. This RFC aims to enhance both println! and dbg! macros to provide a more flexible and convenient way to print variables and their values.
Motivation: The discussion revealed that using Rust's println! and dbg! macros to print variables and their values can be redundant and time-consuming, particularly with long or nested identifiers. The proposed shorthand syntax addresses this issue, making it more convenient to print variables and their values without sacrificing readability.