A way to distinguish "gradual typing" from "anything possible"

Aperta
#2,711 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
ruby
Ambito
tooling

Direzione di ricerca

Questa issue non indica file o test del repository. Inizia leggendo il pull request di rename collegato e l’esempio di Datadog per comprendere la distinzione proposta e l’approccio esistente agli alias. Il lavoro sarebbe completo quando fosse disponibile un design RBS concordato per rappresentare i due significati e un maintainer avesse deciso se fornire il supporto integrato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Since the renaming any into untyped there is no good way semantically to separate your progress of gradual typing from the uncontrollable type.

In Datadog we build some tools to help us track gradual typing progress and we have to define our way to express situations like "this is user input and literally anything could be given".

For now, we just stick with a simplest solution to alias untyped as any and make an agreement to use any only when we can't narrow down the expected type due to its nature.

module Datadog
  type any = untyped
end

Maybe we also could use some other types for that alias like Object or BasicObject, but this is not the point.

What is your opinion on RBS providing a built-in way to distinguish "I don't have to type it now" from "I don't control the type, it could be anything" or is there a better way of doing that differentiation?

Lingua principale
Ruby
Stelle
2.2k
Fork
263
Merge medio
1g 20h
PR unite (30g)
64

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ruby/rbs

Tutte le issue di ruby/rbs

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.