Skip to content

Mitigate runtime errors for inf values #86

@heinezen

Description

@heinezen

We have thought about amending the nyan language spec to mitigate runtime errors:

  • If an optional(..) type member has the None value assigned, all relative operations (+=, *=, etc.) on the value will have the result None.
  • The inf value for the int/float types can only be assigned -> Relative operation using inf as the operand will be disallowed.
  • The special case inf *= 0 will cause a RuntimeError

From: https://matrix.to/#/!iPmyRMGnDgSMPGqgaX:matrix.org/$w2yaN1vNl21LMYIU-CMcu2nNJDGHoLr1l1OhJP-BtwI?via=matrix.org&via=sft.lol&via=stusta.de

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++involves C++ codeimprovementimproves existing functionalityspecificationinvolves the nyan language specification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions