Going to chime in a bit here...
"Avoid #if os(Linux)… When you do this, you lose all help from Xcode. It can’t do syntax checking” ... That’s not correct. Jeff was seeing the effect of something else blocking this from happening.<p>arc4random, yeah, it doesn't exist on Linux currently, but there are other options that are better anyway, like using TurnstleCrypto.<p>For Perfect, there's also a macOS app that aside from helping the process of starting projects, dependencies, building etc - it also integrates a standardized Docker Ubuntu 16 image which also hooks into Xcode so when you build it's also building in Ubuntu and therefore catches linux-specific build issues immediately.<p>Anyway, my 2c.<p>(Full disclosure, I work on the Perfect dev team)
Its cool that you can run Swift on the server, but that sure does seem like a lot of hoops to jump through, coupled with equally many gotchas. No threading on Linux, NSUnimplemented all the time, no built in random, poorly implemented foundation types, etc. seem like a lot to deal with.<p>It seems a more developed language/runtime (e.g. C#/F#/VB .NET or Java 8) would do a lot better with these specific requirements (typesafe, well-tooled, x-plat, server-side app) than Swift. Especially if you're going to be writing the UI in html/js/css and are thus not anchored to the Apple ecosystem anyway, Swift seems like a bizarre choice.<p>The author seems to like xcode quite a bit, but I don't see it as more competitive or better than any other IDE. Not to mention it does window management and the like differently from everyone else, so when you're getting into it, it feels like you have to learn IDEs, <i>and then</i> you need to learn xcode. I also don't understand why people are so complacent about xcode crashing all the time - if VS Code or VS or Eclipse or IntelliJ <i>ever</i> crashed on me I'd be pretty darn upset.
<p><pre><code> > "Python works okay, but I think Xcode is great because of autocomplete and syntax checks."
</code></pre>
Well, just say that you wanted to try something new. That's a much better excuse to pick a technology.<p>I think that there are some great tools around for Python, and picking a language because of XCode... I think that one of the major selling point of Xamarin is that you can avoid it altogether :-)
Sounds like it's got a bit of development to go before the language is suitable for this use case, but I must admit I'm quite excited about it.<p>Having recently been experimenting with Go and Rust in the same sort of space, my impression is that Go is a bit too verbose and lacking in features - definitely works and lots of people like that, but I don't find it particularly powerful. Rust is great, but I've found that web backends end up with too much code - and it's still quite a challenging language to use, though that may be my inexperience. Building iOS apps in Swift recently, I've really started to get enjoy using the language. Once the various issues are worked out, I'm optimistic about its suitability for things like that - and it's great to have more language options to play with!
I still wonder <i>why</i> i would use Swift in the backend.<p>- elixir/erlang: fault tolerance, scalability, high complexity web apps<p>- Node: npm already has what you need, SSR for SPAs, JS is accessible for frontend guys (sort of)<p>- Golang: dead-easy microservices with CLI support, single file deployments, good performance, beginner level language makes Training/hiring easy<p>- Rust: excellent performance and great typesystem, ideal for writing Heavy core algorithms of products and use them as libs from other languages. Also all benefits of Go (except ease-of-learning).<p>- ...<p>- swift? Given that learning languages is not an issue, why should I prefer swift over other stuff? Are there real selling points?
Reading about Swift on server side and looking at Swift server dev mailing list. It appears to me that most appropriate use case of Swift on server side is Apple platform where client side is already written in Swift.<p>The server side group at Apple/IBM seems mostly looking for Swift wrappers around C/C++ core technology for sockets/http/ssl related work. This might be amply sufficient for Apple or IBM developing LOB apps in Swift but I do not see how it is very convenient for generic server side applications.
> You don’t have to see Linux’s horrible UI.<p>lol excuse me? Actually now I'm thinking, what does he mean by "Linux?" Like, Ubuntu server? Is the UI for that considered bad?
"In server-side Swift, you don’t use interface builder, so that reduces most of your crashes to none."<p>You don't use that in iOS app development either unless you are completely insane or are just beginning iOS development and don't know how to make UI properly.
butwhy.gif<p>i get that isomorphism is very helpful long term for larger code bases, and being able to share libraries between your ios and server/backend would be very awesome, but at what cost?<p>there are proven server ecosystems that are going to be much less "innovation token" laiden than swift, surely?