I wonder if this was announced as a reaction to Swift going open source. I could see some IBM team working on this system as a POC, and suddenly being given an urgent deadline to coincide with the license change. Gain from the momentum and maybe turn a pet project into something bigger. I guess that's the benefit of having tens of thousands of developers...
I think that you are right on this, when looking at one of the examples (server.swift) it seems that people are paid by characters typed and they forget (or never heard of) the mantra DRY (Don't Repeat Yourself):
func fdSet(fd: Int32, inout set: fd_set) {
let intOffset = Int(fd / 16)
let bitOffset: Int = Int(fd % 16)
let mask: Int = 1
I wonder if this was announced as a reaction to Swift going open source. I could see some IBM team working on this system as a POC, and suddenly being given an urgent deadline to coincide with the license change. Gain from the momentum and maybe turn a pet project into something bigger. I guess that's the benefit of having tens of thousands of developers...
Apple and IBM are fairly close nowadays. Because of that, I got the impression this and Apple's announcement are coordinated actions.
I wonder if this was announced as a reaction to Swift going open source. I could see some IBM team working on this system as a POC, and suddenly being given an urgent deadline to coincide with the license change. Gain from the momentum and maybe turn a pet project into something bigger. I guess that's the benefit of having tens of thousands of developers...
I think that you are right on this, when looking at one of the examples (server.swift) it seems that people are paid by characters typed and they forget (or never heard of) the mantra DRY (Don't Repeat Yourself): func fdSet(fd: Int32, inout set: fd_set) { let intOffset = Int(fd / 16) let bitOffset: Int = Int(fd % 16) let mask: Int = 1
Given the unfortunate way fd_set apparently got imported, how else would you do this? The only alternative I see is to throw UnsafeMutablePointer at it, but that brings in the ugly specter of undefined behavior. Note that in Swift you cannot use a variable to address a tuple, so there's no way to use intOffset to access the corresponding field of set.__fds_bits.
This is really cool to see. Really hoping to see something similar appear for Swift on Azure or AWS. Also really hoping to see Swift web frameworks begin to appear, now that Swift is open-sourced & running on Linux.
Absolutely. Two days ago (before the open source announcement), I begrudgingly started learning Swift for a school project in iOS development. Now I'm itching to dive into the language.
I am looking for a new language to learn, preferably more PC style platform focused, would this be a good language to learn?
Look into F#. It's open source. Works on Linux, Mac OS X, Android, iOS, Windows, etc. It has a good ecosystem and tooling built around it already but you can also tap into the C# ecosystem, if necessary. It compares really well to Swift: http://www.slideshare.net/ScottWlaschin/swift-vslanguagex but even without that comparison, it's worth a look on its own.
I've looked into F# a few times. It's not ready on Mac. I wish people would quit suggesting until it's really baked.
I think that you are right on this, when looking at one of the examples (server.swift) it seems that people are paid by characters typed and they forget (or never heard of) the mantra DRY (Don't Repeat Yourself): func fdSet(fd: Int32, inout set: fd_set) { let intOffset = Int(fd / 16) let bitOffset: Int = Int(fd % 16) let mask: Int = 1
Given the unfortunate way fd_set apparently got imported, how else would you do this? The only alternative I see is to throw UnsafeMutablePointer at it, but that brings in the ugly specter of undefined behavior. Note that in Swift you cannot use a variable to address a tuple, so there's no way to use intOffset to access the corresponding field of set.__fds_bits.
For me is hard to understand how a language with a behavior/constraints like you describe get so much noise about "been easy to use/learn".
I do not like it but at least be DRY as much as possible: