rfc:saner-numeric-strings
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:saner-numeric-strings [2020/07/15 16:24] – Fix a few more typos and inconsistent wording theodorejb | rfc:saner-numeric-strings [2020/11/25 12:46] (current) – Add implentation version number girgias | ||
---|---|---|---|
Line 2: | Line 2: | ||
* Version: 1.4 | * Version: 1.4 | ||
* Date: 2020-06-28 | * Date: 2020-06-28 | ||
+ | * Original Author: Andrea Faulds < | ||
+ | * Original RFC: [[http:// | ||
* Author: George Peter Banyard < | * Author: George Peter Banyard < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
* Implementation: | * Implementation: | ||
Line 136: | Line 138: | ||
Unify the various numeric string modes into a single concept: Numeric characters only with both leading and trailing whitespace allowed. Any other type of string is non-numeric and will throw < | Unify the various numeric string modes into a single concept: Numeric characters only with both leading and trailing whitespace allowed. Any other type of string is non-numeric and will throw < | ||
- | This means, all strings which currently emit the < | + | This means, all strings which currently emit the < |
One exception to this are type declarations as they only accept proper numeric strings, thus some < | One exception to this are type declarations as they only accept proper numeric strings, thus some < | ||
Line 197: | Line 199: | ||
Breaking the second reason will allow to catch various bugs ahead of time, and the previous behaviour can be obtained by adding explicit casts, e.g.: | Breaking the second reason will allow to catch various bugs ahead of time, and the previous behaviour can be obtained by adding explicit casts, e.g.: | ||
<PHP> | <PHP> | ||
- | var_dump((int) " | + | var_dump((int) " |
- | var_dump((float) " | + | var_dump((float) " |
- | var_dump((int) " | + | var_dump((int) " |
var_dump((float) " | var_dump((float) " | ||
</ | </ | ||
Line 226: | Line 228: | ||
* Warn on illegal offsets when used within < | * Warn on illegal offsets when used within < | ||
- | ===== Proposed Voting Choices | + | ===== Vote ===== |
- | Per the Voting RFC, there would be a single Yes/No vote requiring a 2/3 majority for the main proposal. A secondary Yes/No vote requiring a 50%+1 majority will decide whether float strings used as string offsets should continue to produce a warning (with different wording) instead of consistently becoming a TypeError. | + | Per the Voting RFC, there is a single Yes/No vote requiring a 2/3 majority for the main proposal. A secondary Yes/No vote requiring a 50%+1 majority will decide whether float strings used as string offsets should continue to produce a warning (with different wording) instead of consistently becoming a TypeError. |
+ | |||
+ | Primary vote: | ||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
+ | |||
+ | Secondary vote: | ||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== |
rfc/saner-numeric-strings.1594830292.txt.gz · Last modified: 2020/07/15 16:24 by theodorejb