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

Incorrect claim abut dangling else problem in Rust? #65

Open
AlbertoGP opened this issue Dec 9, 2023 · 0 comments
Open

Incorrect claim abut dangling else problem in Rust? #65

AlbertoGP opened this issue Dec 9, 2023 · 0 comments

Comments

@AlbertoGP
Copy link

The fragment below from a review of Austral (“ALookAtAustral2023”) mentions a confusing claim about the dangling else ambiguitiy in other languages: the text seems to imply that it is a problem in Rust, but that is incorrect because they require braces around each branch.

“There are many good reasons to prefer the Rust approach: Programmers care a great deal about ergonomics. The dangling else is a feature of C syntax that has caused many security vulnerabilities. Try taking this away from programmers: they will kick and scream about the six bytes they’re saving on each if statement.” This is a weirdly bad example, given that Rust has taken the dangling else away and lots of people love it and most of the rest seem to not care either way.

The claim appears in the specification section “The cutting room floor”:
https://austral-lang.org/spec/spec.html#rationale-linear-cutting-room-floor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant