Looks pretty shady. Proprietary code through-and-through, and it's "cross platform" because it compiles down to their own proprietary language. It's unclear how you deal with native libraries, if at all. I'll pass, thanks.
Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa
41–50 of 109 posts
Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa
#42I'm curious to know how well it performs. I spent the better part of this weekend rewriting 4k lines of Swift in Objective-C because I couldn't deal with the 60-90 second compile times.
Swift has some land mine issues where the compiler can hit snags handling certain snippets of code (e.g casting to/from Any/AnyObject, method overloading based on constraints, etc) which if you have enough of them will segfault the compiler with something along the lines of "expression too complicated, break it down". I've had to rewrite my approach a few times because of this to avoid certain coding techniques, but…
One other example FWIW: having a largish array of Int arrays causes the compiler to either go into an endless loop or simply take too long, UNLESS the type of the array is specified.
var data = [[1,2,3],[4,5,6], ... ] // > 20 elements -> compiler hangs
as opposed to:
var data:[[Int]] = [[1,2,3],[4,5,6], ... ] // compiles quickly
Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa
#43Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa
#44Earlier quoted context omitted.
Swift has some land mine issues where the compiler can hit snags handling certain snippets of code (e.g casting to/from Any/AnyObject, method overloading based on constraints, etc) which if you have enough of them will segfault the compiler with something along the lines of "expression too complicated, break it down". I've had to rewrite my approach a few times because of this to avoid certain coding techniques, but…
Is there a list somewhere of Swift compiler issues to avoid? Seems like "avoiding certain coding techniques" is what is currently necessary until Apple gets back on top of things... One other example FWIW: having a largish array of Int arrays causes the compiler to either go into an endless loop or simply take too long, UNLESS the type of the array is specified. var data = [[1,2,3],[4,5,6], ... ] // > 20 elements ->…
There's a whole repo dedicated to Swift compiler crashes being maintained at: https://github.com/practicalswift/swift-compiler-crashes
Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa
#45Earlier quoted context omitted.
You can surprisingly effectively cross-compile C and C++ to Javascript now, with Emscripten.
The point is to AOT compile to native code.
Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa
#46Genuinely curious. Why Swift for multi-platform rather than C#, Clojure, JavaScript, or ?
Swift is statically typed, so it doesn't really compete with JS or Clojure. The company already has a C# implementation for sale. Also, Swift was designed to compile to native code, unlike any of the other three languages.
Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa
#47Cool! But, is it possible that this violates Apple's TOS or any legal limitation on use of the Swift language? I remember there being a lot of heated discussion about making Swift officially open source back when it was announced, but I don't recall ever hearing anyone suggest a community project to make an OSS compiler for it. This is most interesting, but I'd love to know that Apple would be okay with this, or woul…
Programming languages cannot be copyrighted. It doesn't look like they've reimplemented any Apple APIs, so there wouldn't appear to be any room for an Oracle-style lawsuit claiming that standard library code was copied. I don't know what the trademark situation might be, though.
Are you sure? I'm genuinely curious to see a reference/precedent. Also, does that restrict patentability of programming language features? (I personally can see PLs not being copyrightable, but being patentable.)
Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa
#48Earlier quoted context omitted.
Programming languages cannot be copyrighted. It doesn't look like they've reimplemented any Apple APIs, so there wouldn't appear to be any room for an Oracle-style lawsuit claiming that standard library code was copied. I don't know what the trademark situation might be, though.
> Programming languages cannot be copyrighted Are you sure? I'm genuinely curious to see a reference/precedent. Also, does that restrict patentability of programming language features? (I personally can see PLs not being copyrightable, but being patentable.)
Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa
#49I just want to write web apps in Swift. Any news on that front?
Re: Silver: A free implementation of Swift for .NET, Java, Android, and Cocoa
#50Earlier quoted context omitted.
Is there a list somewhere of Swift compiler issues to avoid? Seems like "avoiding certain coding techniques" is what is currently necessary until Apple gets back on top of things... One other example FWIW: having a largish array of Int arrays causes the compiler to either go into an endless loop or simply take too long, UNLESS the type of the array is specified. var data = [[1,2,3],[4,5,6], ... ] // > 20 elements ->…
Finding Swift really buggy atm - where XCode, Swift Compiler and SourceCode service routinely crashes multiple times a day for me. A lot of my time is spent sympathizing with the compiler and getting hit with hard fought lessons on what things to avoid - basically don't step too far outside the Swift Programming Guide. Apple's also glacially slow at responding to bug reports - I'm keenly waiting on the next Q/A relea…