alongubkin / alongubkin/spider

Type inference

Aperta
#58 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
1.3k
Fork
46
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Spider is not statically typed language but I believe it's a good option to have. But as I understand you (@alongubkin) don't desire to put it into Spider. But there's alternative which could help a little and wouldn't need to put static typing, I'm talking about **type inferencing** which has been done for JS already:
http://flowtype.org/

First example from the site:

```
/* @flow */
function foo(x) {
return x * 10;
}
foo('Hello, world!');
```

should show error in "compile" time.

```
hello.js:5:5,19: string
This type is incompatible with
hello.js:3:10,15: number
```

I know there are many situations when this could not used anyway but that's just a proposition to have.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.