SharpSwift
SharpSwift copied to clipboard
wrong output
Hi,
it's a cool project but I found a few issues and exceptions that are raised within the convertion. First, the output swift file uses not the correct keywords, like Include instead of Import. I tried to convert a simple class, but it raises a NullReferenceException. In the output files there are modifier which doesn't exists in swift, like "public". And there are also semicolons which are not need.
Regards Ronny
Thanks for checking this out!
Currently SharpSwift is nowhere near ready, and I don't have enough time to fix all the bugs with it. I'm hoping to work more on it around October/November, but if you're interested feel free to start a similar project/send a PR :)
To specifically respond:
- Thanks for catching that, I've fixed it to use import as of commit 1515626
- The exceptions are just a matter of debugging right now, there's a lot of cases that I haven't added code to check for.
- It's my understanding that Swift does have access modifiers, at least as of beta 4: https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/AccessControl.html
- The semicolons are really just personal preference :) And I assume most C# devs would like to have semicolons, but it wouldn't hurt to put a switch in to disable them.
Thanks, Matthew
Hi, thanks for your answer.
I think its a really great idea and it could also be great to create a online converter ;) Today I created my own simple not working converter to test a few things and I had a few ideas. Maybe you could ignore method bodies that can't be converted and add it within a comment to the swift file. For the most developers it should be reach to implement a good convertion for method and class headers and a few other things like foreach, while, switch and if statements.
best regards Ronny