3 ms·
Will this language ever work to write Linux software? (Or Windows)
by Aardwolf 12y ago
Will this language ever work to write Linux software? (Or Windows)
- rsynnott 12y agoIt seems fairly likely that it will be open sourced at some point, though not for a while: http://article.gmane.org/gmane.comp.compilers.clang.devel/37217 http://article.gmane.org/gmane.comp.compilers.clang.devel/37... Of course, in practice, current development with Swift is mostly pretty dependent on Cocoa, but there's no inherent reason it has to be.
- josephlord 12y agoI believe it will be possible (I'm expecting Apple to open source it after it is out of beta as they do with their LLVM changes) and that it could then be used on any platform LLVM supports. That doesn't mean that I think that it will be widely used, the Objective C compatibility won't be very helpful. It does integrate cleanly with C but C++ libraries need to be wrapped in C/Obj-C at the moment. I do like Swift and it quite possible it will be used on other platforms but I'm not convinced. I haven't really checked out Rust and Go properly yet but compared with C/C++ Swift might be tempting for a new project on other platforms.
- simonh 12y agoIn theory yes, but in practice no. It's constructed around a solid core of the Objective C object model and runtime. Rudimentary open source versions of these exist, but they are _very_ rudimentary. The value in those technologies is all concentrated in the Coacoa and Coacoa Touch libraries and frameworks, which are proprietary to Apple. Trying to use these technologies on another platform would be like trying to develop software using the core of the Python language with none of the standard library or external libraries (imagine they were implemented in another language you couldn't port). Or like implementing just the C# language on another platform, without any of the .NET libraries. It's possible, Mono did just that, but they had to re-implement almost the entire .NET infrastructure from scratch, a task many orders of magnitude greater than just duplicating the language itself.
- rsynnott 12y ago> In theory yes, but in practice no. It's constructed around a solid core of the Objective C object model and runtime. Not sure I agree. You won't be making a Cocoa UI in it or anything, but if they open source the compiler and modifications to the Objective C runtime, along with the standard library (which is really light right now; you have to use Cocoa for very simple things), it should be useful enough, with GNUStep.