Skip to content

decide whether to support indexing with floats #625

@StefanKarpinski

Description

@StefanKarpinski

Currently, we support indexing with floats in most places by rounding the float value to an integer. That's been called into question a number of times. There are three obvious behaviors we could go with here:

  • Keep the current float-rounding approach for non-integer indices
  • Only allow integer indices and throw a no method error when someone indexes with floats
  • Hybrid: allow indexing with floats, but only if they're integer-valued.

We need to decide on this before v1.0; the safest approach is to disallow non-integer indexing, since that gives us the option of changing our minds later without breaking existing code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThis change will break codeneeds decisionA decision on this change is needed

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions