You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I've been experimenting with Rust since around the 0.3 release, but this is my first time posting an issue. I tried looking to see if there was already an open issue related to this, but I couldn't find anything.
Being a long-time C# programmer, I have a lot of code written in C# that I've transcribed to Rust. Attributes are a language feature that C# and Rust share in common, yet I've always found Rust's syntax for declaring attributes to be clunky and limiting.
This allows us to save a line of text, and removes some noise from the screen. I wrote this issue because I wanted to propose that Rust should implement a similar setup for attribute declaration, making both of the following be valid syntax and having the same effect on code:
Hello, I've been experimenting with Rust since around the 0.3 release, but this is my first time posting an issue. I tried looking to see if there was already an open issue related to this, but I couldn't find anything.
Being a long-time C# programmer, I have a lot of code written in C# that I've transcribed to Rust. Attributes are a language feature that C# and Rust share in common, yet I've always found Rust's syntax for declaring attributes to be clunky and limiting.
Consider the following Rust code:
If I were to write that same code in C# syntax, it would look somewhat like this pseudocode:
However, C# allows you to condense attributes into a single pair of square brackets, like so:
This allows us to save a line of text, and removes some noise from the screen. I wrote this issue because I wanted to propose that Rust should implement a similar setup for attribute declaration, making both of the following be valid syntax and having the same effect on code:
If this was brought up in the past and declined, I apologize. Thank you for taking the time to check this out.
The text was updated successfully, but these errors were encountered: