Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanups: Split type and object definitions #3526

Conversation

StephanTLavavej
Copy link
Member

There are a few cases where we prefer to spend extra lines for clarity. (Examples: In modern code we strongly prefer to avoid packing too many side-effects into an expression, we avoid defining multiple variables on a single line, and we usually prefer to avoid elaborate conditional operators.)

One such case is simultaneously defining a type and an object. We prefer to do this separately, because they happen in different "domains". (Only lambdas get to be special!)

We accumulated a few occurrences throughput the codebase, which I tracked down. I consider this convention important enough (and the transformation simple enough) to be worth updating tests/std.

@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Mar 3, 2023
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner March 3, 2023 19:47
@StephanTLavavej StephanTLavavej self-assigned this Mar 7, 2023
@StephanTLavavej
Copy link
Member Author

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 1c60dc4 into microsoft:main Mar 7, 2023
@StephanTLavavej StephanTLavavej deleted the stl-cleanups-split-types-and-objects branch March 7, 2023 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants