Proposal: Optional "return" as Syntactic Sugar in ReScript 13
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript, ocaml
- Bereich
- compilers, developer-experience
Rechercherichtung
Das Issue nennt keine Dateien, Tests oder Compiler-Einstiegspunkte. Beginne mit der RFC-Diskussion und der geplanten Überprüfung durch das core team; als abgeschlossen würde ein genehmigter Prototyp und ein Entwurf der Dokumentation gelten, gefolgt von Feedback aus der Community.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Author: Jonathan Jewell Status: Draft / RFC Goal: Facilitate onboarding for JS/TS developers without compromising ReScript’s functional core.
Overview
Add return as optional syntactic sugar for function expressions. This desugars to the last expression during compilation, with zero semantic or performance impact.
Call to Action
- If this sounds good, I am offering to:
- Implement the prototype and draft documentation.
- Monitor community feedback and report back before ReScript 14.
- Proposal team:
- Greenlight: To try it as an experiment, see what the reception is.
- Feedback: Suggest improvements or dealbreakers.
- Veto: If the team feels this is misaligned, we can drop it - no hard feelings!
Final Note:
This is not about changing ReScript, but I think it is useful in helping onboard more developers to discover why it is great and helps users implement some of the most basic functions in their language in Rescript. If it does not work or is received poorly, we can kill it without any issue. But in any case, it is optional for use, and - as sugar - and would not anticipate any reason to affect backward compat or future ambitions for the language.
Next Steps:
- Discuss in the next core team meeting.
- If approved, I’ll open a PR for the prototype.
- Interact with the community via an RFC or blog post.
- Vorherrschende Sprache
- OCaml
- Sterne
- 7.5k
- Forks
- 485
- Ø Merge
- 1 T. 4 Std.
- Gemergte PRs (30 T.)
- 50
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rescript-lang/rescript
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
rescript-lang/rescript#8688 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 76/100
rescript-lang/rescript#8687 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
rescript-lang/rescript#8659 · 2 Kommentare · 2 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
rescript-lang/rescript#8647 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Untagged variants: boolean literal/payload overlap is rejected while string, int, float and bigint overlap is allowedEvtl. vergeben @cknitt hat das vor 21 Tagen übernommen. Offen
rescript-lang/rescript#8632 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in rescript-lang/rescript
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
backend:SystemZ
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
llvm/llvm-project#226800 ·
Maintainer antworten meist innerhalb von 1 Tag