Hacker News new | past | comments | ask | show | jobs | submit login

It would be interesting if it first converted the swift code to TypeScript then JS



Why would that be interesting? Presumably a Swift compiler handles its own type checking.


TypeScript would be a simpler translation target because it's very similar to Swift, and then TypeScript could handle the translation down to ES6, ES5, ES3, etc. Why reinvent what's already available?


TypeScript is merely JS with added type annotations, annotations which are stripped off when it compiles to JS.

There's no usefulness of TypeScript as a target for a compiler for Swift, because Swift already has static typing.


Totally agree :) I'm working on something similar that uses flow and Crystal (which shares a lot of language features with Swift).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: