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

Planning: Primitive type contracts #46

Open
LB-- opened this issue Dec 16, 2021 · 0 comments
Open

Planning: Primitive type contracts #46

LB-- opened this issue Dec 16, 2021 · 0 comments
Assignees
Labels

Comments

@LB--
Copy link
Member

LB-- commented Dec 16, 2021

In the video CppCon 2016: Chandler Carruth “Garbage In, Garbage Out: Arguing about Undefined Behavior...", the presenter at one point brings up the notion of having multiple integer types with the same width and signedness, but different contracts/behavior for things like wrap around and shifting past the end. I am wondering whether this is better handled as distinct types, or as different versions of the primitive operations themselves. For example, two different addition operations, one which does wrap-around and one which doesn't. Then the type wouldn't matter, only the operation.

@LB-- LB-- added the planning label Dec 16, 2021
@LB-- LB-- self-assigned this Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant