Skip to content

Commit 058bf90

Browse files
authored
Fold rejected solutions for easier processing (#1706)
* fold rejected solutions * move title out of the section * add solution-4 anchor
1 parent dd2c3c6 commit 058bf90

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

rfcs/SemanticNullability.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,9 @@ The community has imagined a variety of possible solutions, synthesized here.
535535
Each solution is identified with a `Number` so they can be referenced in the
536536
rest of the document. New solutions must be added to the end of the list.
537537

538+
Some of the solutions have been ruled out and are kept here for historical
539+
reasons. Those solutions are folded in a `<details>` tag.
540+
538541
Semantic nullability is only relevant to output positions, so when comparing
539542
syntax we will look for changes versus the current syntax used to represent
540543
these types:
@@ -633,6 +636,10 @@ have been discussed the choice of symbol comes down mostly to aesthetics.
633636

634637
## 💡 2. "Strict Semantic Nullability"
635638

639+
<details>
640+
641+
<summary>Rejected - click for details</summary>
642+
636643
[solution-2]: #-2-strict-semantic-nullability
637644

638645
**Champion**: @leebyron
@@ -694,9 +701,14 @@ symbol) to indicate that a position may semantically be null.
694701
- [R][criteria-r]
695702
- ❔
696703

704+
</details>
697705

698706
## 💡 3. New "Semantic Non-Null" type, usurping `!` syntax
699707

708+
<details>
709+
710+
<summary>Rejected - click for details</summary>
711+
700712
[solution-3]: #-3-new-semantic-non-null-type-usurping--syntax
701713

702714
**Champion**: @benjie
@@ -790,9 +802,16 @@ day-to-day work.
790802
- [R][criteria-r]
791803
- ✅ Syntax used for inputs is unchanged with or without the directive.
792804

805+
</details>
793806

794807
## 💡 4. New "Semantic Non-Null" type, with `?` used for nullable types
795808

809+
[solution-4]: #-4-new-semantic-non-null-type-with--used-for-nullable-types
810+
811+
<details>
812+
813+
<summary>Rejected - click for details</summary>
814+
796815
**Champion**: none (put your name here to become the champion!)
797816

798817
This proposal builds on solution 3, but with a syntactic shuffle such that the
@@ -853,9 +872,15 @@ Syntax only changes when `@semanticNullability` directive is present:
853872
- [R][criteria-r]
854873
- 🚫 Input positions have changed `Int` &rArr; `Int?`, `Int!` &rArr; `Int`
855874

875+
</details>
876+
856877

857878
## 💡 5. Use non-null in semantically non-nullable places and encourage disabling error propagation
858879

880+
<details>
881+
882+
<summary>Rejected - click for details</summary>
883+
859884
[solution-5]: #-5-use-non-null-in-semantically-non-nullable-places-and-encourage-disabling-error-propagation
860885

861886
**Champion**: @martinbonnin
@@ -909,6 +934,8 @@ This proposal relies on the ability of clients to opt out of error propagation;
909934
- [R][criteria-r]
910935
- ✅ Same syntax.
911936

937+
</details>
938+
912939
## 💡 6. `@semanticNonNull` directive
913940

914941
[solution-6]: #-6-semanticnonnull-directive

0 commit comments

Comments
 (0)