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

Support 'unchecked' at the function-declaration level #11269

Closed
barakman opened this issue Apr 19, 2021 · 2 comments
Closed

Support 'unchecked' at the function-declaration level #11269

barakman opened this issue Apr 19, 2021 · 2 comments
Labels
closed due inactivity The issue/PR was automatically closed due to inactivity. language design :rage4: Any changes to the language, e.g. new features stale The issue/PR was marked as stale because it has been open for too long.

Comments

@barakman
Copy link

Abstract

It is a typical scenario for an entire function to be implemented with native (unsafe until solc 0.8.0) arithmetic operations, in order to optimize its performance, and under the author's knowledge of the function being robust for arithmetic overflows.

Motivation

According to the official documentation:

To avoid ambiguity, you cannot use _; inside an unchecked block.

Subsequently, one cannot implement a modifier which would allow "declaring" an entire function unchecked.

Specification

Please consider supporting unchecked at the function-declaration level, in order to allow for cleaner code.

@cameel cameel added feature language design :rage4: Any changes to the language, e.g. new features labels May 4, 2021
@github-actions
Copy link

This issue has been marked as stale due to inactivity for the last 90 days.
It will be automatically closed in 7 days.

@github-actions github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Mar 18, 2023
@github-actions
Copy link

Hi everyone! This issue has been automatically closed due to inactivity.
If you think this issue is still relevant in the latest Solidity version and you have something to contribute, feel free to reopen.
However, unless the issue is a concrete proposal that can be implemented, we recommend starting a language discussion on the forum instead.

@github-actions github-actions bot added the closed due inactivity The issue/PR was automatically closed due to inactivity. label Mar 26, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed due inactivity The issue/PR was automatically closed due to inactivity. language design :rage4: Any changes to the language, e.g. new features stale The issue/PR was marked as stale because it has been open for too long.
Projects
None yet
Development

No branches or pull requests

3 participants