jbenet / random-ideas

random ideas
juan.benet.ai
324 stars 12 forks source link

JS dialect (type-safe) FFI #12

Open jbenet opened 10 years ago

jbenet commented 10 years ago

Several js "dialects" are springing up. Many languages that compile to js in one form or another. While everything compiles to js, some languages are less able to import and use js code, because the languages don't mix well.

Another problem is that type-safe dialects (typescript, purescript, etc) lose all type safety when compiled down to js. So importing a compiled module does not confer you any typing benefits in the interface.

It would be interesting to create an interface standard with type information that multiple languages can match. Would seriously help software reusability.