Proposal: Optional "return" as Syntactic Sugar in ReScript 13
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- javascript, ocaml
- Domaine
- compilers, developer-experience
Piste de recherche
L’issue ne mentionne aucun fichier, test ou point d’entrée du compilateur. Commencez par la discussion du RFC et la revue prévue par le core team ; la finalisation nécessiterait un prototype approuvé et une ébauche de la documentation, suivis des retours de la communauté.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- OCaml
- Étoiles
- 7.5k
- Forks
- 485
- Merge moyen
- 1 j 4 h
- PR mergées (30 j)
- 50
Préparer son environnement
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de rescript-lang/rescript
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
rescript-lang/rescript#8659 · 2 commentaires · 2 réactions ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
rescript-lang/rescript#8647 ·
Les mainteneurs répondent en général sous 1 jour
-
Untagged variants: boolean literal/payload overlap is rejected while string, int, float and bigint overlap is allowedPeut-être pris @cknitt l’a pris il y a 21 jours. Ouverte
rescript-lang/rescript#8632 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 28/100
rescript-lang/rescript#8624 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
rescript-lang/rescript#8596 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de rescript-lang/rescript
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
todo:ticket
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
publicodes/publicodes#868 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 89/100
Les mainteneurs répondent en général sous 1 jour