One class per file #4141
Unanswered
gordanr
asked this question in
Language Ideas
Replies: 1 comment
-
I do not like that syntax, as it could be confused with top-level function defintions when the line Lastly, what about: using System;
public record R(int a, int b)
{
public int Sum() => a + b;
} This could be transformed into: using System;
public record R(int a, int b);
public int Sum() => a + b; Which (correct me if I'm wrong), is already a legal syntax (even though Or would your proposal be constraint to structs, classes, and interfaces only? (excluding records) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Looking at very good proposal #137 (File scoped namespaces), I am thinking why not to remove extra nesting in case of one class per file.
Instead of
Maybe we can write
Beta Was this translation helpful? Give feedback.
All reactions