Skip to content

RFC: remove the ability to use E rather than e in float literals #5171

Closed
@bstrie

Description

@bstrie

Right now both of the following are legal:

let foo = 9.02e6;
let bar = 9.02E6;

In the interest of There's Only One Way To Do It, I don't see why having two slightly different forms for the same result is necessary. I thereby propose that the capitalized form be removed because:

  1. All other letters in numeric literals (i, u, f) are lower case. Mandating e would make literals more consistent.
  2. Among numbers, a lowercase letter is easier to recognize at a glance than an uppercase one, making this a readability win.

This also makes the grammar slightly simpler. But really I just care about not having two trivially different ways of doing the same thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions