Skip to content

consider removing the fallback to int for integer inference #6023

Closed
@thestinger

Description

@thestinger

I find it really easy to accidentally end up using int. It can be inferred as uint based on a function call, but if you delete a line of code you're back to int and possibly a bug. I don't think it's that much pain to tag one of them with i.

If #4169 is implemented, different strategies for overflow (expand to big integer, wrap, trap with a condition) can just be implemented as first-class library types. Haskell has a fallback to a big integer, but at least that's much less likely to cause a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions