4 ms·
It is a cool idea but I don't understand why you don't write your compiler in Swift so at some point you can compile your compiler with your own compiler. Unfo
by SneakerXZ 11y ago
It is a cool idea but I don't understand why you don't write your compiler in Swift so at some point you can compile your compiler with your own compiler.
Unfortunately, it is far from usable. It is unable to parse even basic Swift code.
- dchurchill 11y agoThanks. The project is still in active early development, so there are still a lot of bugs that need to be worked out. We have a good portion of the core language features covered so far, and are working on adding more.
- mikeash 11y agoIt looks like you're using built-in collection types in the resulting JavaScript without accounting for the fact that Swift collections are value types, not reference types. Do you plan to address this? There's another third-party Swift implementation out there focusing on Android which does the same thing and buries this drastic language change in the fine print, which is rather unfortunate.
- Dnld 11y agoThis is on the radar. The differences between the languages, especially regarding collections, are tricky. For example we're finalizing a data structure to mimic tuples that would allow value lookup by index and/or element name.
- mikeash 11y agoGreat! It must be pretty tricky to translate that across without destroying performance and interoperability. I just wanted to check, because the other one seemed to think it was no big deal to leave it this way.
- chrisseaton 11y ago> I don't understand why you don't write your compiler in Swift so at some point you can compile your compiler with your own compiler Is there a solid technical or user requirement for that to be done? If there isn't, why do it?
- TazeTSchnitzel 11y agoWell, getting a compiler to be self-hosting means it has to be good enough to compile a large, complex, real-world application: itself.