Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Proposal to rename Null->Nullable, Nullable->Nullish

Offen
#8,378 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Ruhig
Tech-Stack
javascript, ocaml
Bereich
compilers

Rechercherichtung

Der Vorschlag betrifft die Module Null und Nullable, deren generiertes JavaScript-Verhalten und ein mögliches ReScript-Konfigurations-Feature-Flag. Da keine Dateien, Tests oder Einstiegspunkte genannt werden, beginne damit, diese Module zu finden und den vorgeschlagenen Migrationsplan für v12–v14 zu prüfen. Als abgeschlossen gilt die Arbeit, wenn vor der Implementierung eine gemeinsame Benennungs- und Migrationsstrategie festgelegt wurde.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Image

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.

  1. In next v12 minor we deprecate Nullable module in favor of the new Nullish module
  2. In v13 we we remove Nullable in favor of Nullish
  3. In v14 we deprecate Null module in favor of Nullable - I think there should be a whole major version without Nullable module 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.

Vorherrschende Sprache
OCaml
Sterne
7.5k
Forks
485
Ø Merge
1 T. 2 Std.
Gemergte PRs (30 T.)
55

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus rescript-lang/rescript

Alle Issues in rescript-lang/rescript

Ähnliche Issues

Weitere Issues zu Compilers

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.