Proposal to rename Null->Nullable, Nullable->Nullish
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- javascript, ocaml
- Área
- compilers
Línea de trabajo
La propuesta se refiere a los módulos Null y Nullable, a su comportamiento en JavaScript generado y a un posible indicador de funcionalidad de configuración de ReScript. Como no se nombran archivos, pruebas ni puntos de entrada, empieza por localizar esos módulos y revisar el plan de migración propuesto para v12–v14. Se considerará terminado cuando se haya acordado una estrategia de nomenclatura y migración antes de la implementación.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I'm perfectly fine with naming we had all this time, but in a new era AI writes most of the code, and I think having a naming parity with JavaScript is more important. For example, this proposal was inspired by the Claude Code session where it was doing bindings for napi-rs and it used Nullable.t type thinking that its value is null, like in TS. I had to correct it myself, saying that it should use a more correct Null.t type.
Additionally, Null.t by itself is already confusing, making me subconsciously think that it's just a null value type.
Proposed migration plan
Since this is a very big breaking change and updating both modules at the same time will be an issue because it might silently change generated JavaScript code, I think we must approach it in multiple major releases. And because of this, start earlier. Here is the proposed plan.
- In next v12 minor we deprecate
Nullablemodule in favor of the newNullishmodule - In v13 we we remove
Nullablein favor ofNullish - In v14 we deprecate
Nullmodule in favor ofNullable- I think there should be a whole major version withoutNullablemodule to prevent issues during migration
To accelerate the change, we can add a feature flag in ReScript config which would allow us to explicitly force the migration: Null->Nullable, Nullable->Nullish
Let me know what you think.
- Lenguaje dominante
- OCaml
- Estrellas
- 7.5k
- Forks
- 485
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 55
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rescript-lang/rescript
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
rescript-lang/rescript#8659 · 2 comentarios · 2 reacciones ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
rescript-lang/rescript#8647 ·
-
rescript-lang/rescript#8632 · 1 asignado ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 28/100
rescript-lang/rescript#8624 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
rescript-lang/rescript#8596 · 2 comentarios ·
Todos los issues de rescript-lang/rescript
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
objectionary/jeo-maven-plugin#1758 ·
-
mlir
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
llvm/llvm-project#224908 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
area-CodeGen-coreclr untriaged
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
secondlife/sl-vscode-plugin#147 ·