Proposal to rename Null->Nullable, Nullable->Nullish
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Funcionalidade
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- javascript, ocaml
- Domínio
- compilers
Direção de pesquisa
A proposta diz respeito aos módulos Null e Nullable, ao comportamento do JavaScript gerado por eles e a uma possível feature flag de configuração do ReScript. Como nenhum arquivo, teste ou ponto de entrada é mencionado, comece localizando esses módulos e revisando o plano de migração proposto para v12–v14. O trabalho estará concluído quando uma estratégia de nomenclatura e migração tiver sido acordada antes da implementação.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- OCaml
- Estrelas
- 7.5k
- Forks
- 485
- Merge médio
- 1d 2h
- PRs com merge (30d)
- 55
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de rescript-lang/rescript
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
rescript-lang/rescript#8659 · 2 comentários · 2 reações ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
rescript-lang/rescript#8647 ·
-
rescript-lang/rescript#8632 · 1 responsável ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 28/100
rescript-lang/rescript#8624 ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 30/100
rescript-lang/rescript#8596 · 2 comentários ·
Todas as issues de rescript-lang/rescript
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
objectionary/jeo-maven-plugin#1811 ·
-
`String.Parser.chompUntilEndOr` leaves the column one short when it runs to the end past a newline Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
enhancement PyCDE
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
llvm:support
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
llvm/llvm-project#226296 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100