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

Remove some explicit (Mutable)ArrayRef constructions #4238

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

dwblaikie
Copy link
Contributor

Rely on implicit conversion in call sites and initialization.

Removing the explicit conversions is only code simplication.
Moving from auto x = Y(z) to Y x = z; helps ensure that only implicit constructors/conversions are happening (whereas the prior syntax allows explicit conversions) which can help with readability since implicit conversions are generally "less complex"/risky/attention-requiring.

Rely on implicit conversion in call sites and initialization.
Copy link
Contributor

@jonmeow jonmeow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This all looks better to me.

@jonmeow jonmeow enabled auto-merge August 22, 2024 19:35
@jonmeow jonmeow added this pull request to the merge queue Aug 22, 2024
Merged via the queue into carbon-language:trunk with commit 5a11048 Aug 22, 2024
10 checks passed
@dwblaikie dwblaikie deleted the remove_explicit_array_ref branch August 22, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants