Skip to content

Commit 5c164bb

Browse files
committed
Expand on the unresolved question of integer fallback.
1 parent 5c1cf6a commit 5c164bb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

text/0000-default-type-parameter-fallback-take-two.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,9 @@ fn foo<T=char>(t: T) { ... }
566566
fn main() { foo::<_>(22) }
567567
```
568568

569-
There is a concern with forward compatiblity of this approach presented about expanding the types a literal may be inferred to. Therefore it seems best to take option 1 or 4, as they future extensible to option 3. Any option other than 2 requires a phase-in period. Options 1 and 3 may change the behaviour of existing code, while option 4 may make existing code error. The consensus reached in the thread was for option 4, to be future-extensible but avoiding changing behaviour of existing code, is that still the consensus?
569+
Any option other than 2 breaks existing code and will require some sort phase-in, options 1 and 3 may change the behaviour of existing code while option 4 may make existing code error. Options 1 is extensible to option 3 and option 4 is extensible to any other option. The consensus reached in the thread was for option 4, to be future-extensible but avoiding changing behaviour of existing code, is that still a consensus?
570+
571+
The decision seems to come down between complete backwards compatibility with option 2 or complete forwards compatibility with option 4. If we were to take option 4 now is the best time, however it might break too much code to be viable and implementing it as a lint might be an implementation hazard.
570572

571573
### Terminology and syntax
572574

@@ -606,5 +608,4 @@ fn main() {
606608
}
607609
```
608610

609-
We need to figure the design and implemetation of defaults in specialization chains. Probably we want to allow only one default for a parameter in a specialization chain.
610-
611+
We need to figure the design and implementation of defaults in specialization chains. Probably we want to allow only one default for a parameter in a specialization chain.

0 commit comments

Comments
 (0)