News for hackers. Stuff that matters.
Re:Swift Server Work Group Annual Update by wlesieutre on Thursday October 31, 2019 @03:25PM (#21412623)
If anything, the comparison I'd make is javascript. Just like Node, it's a nice notion that you can take your client language and use it on a server. Aside from that, does anyone think that javascript is a good language choice for backend development?

Swift has a lot more redeeming aspects than javascript does, but like this post acknowledges, they don't have its package ecosystem.

Re:Swift Server Work Group Annual Update by skohan on Thursday October 31, 2019 @04:22PM (#21413299)
> they don't have its package ecosystem.

I think in some ways this is a chicken-and-egg problem. If people start working with Swift in the server space, that ecosystem will quickly evolve.

Also, Swift has great interop with the C FFI, so you have access to every C library, and every Rust library with a C API to boot.

edit:

> Aside from that, does anyone think that javascript is a good language choice for backend development?

I write a lot of swift code for personal projects, largely because it's so nice to program in, and I actually think it could be a great choice for back-end development.

I think Swift offers many of the same advantages of Rust in terms of a robust, powerful type system, and the feeling that if your code compiles, you're probably not going to have too many runtime errors (as long as you followed the rules).

Swift makes tradeoffs in favor of developer ergonomics where Rust chooses in favor of performance. In the vast majority back-end cases, Swift's performance will be good enough, and it's ease of use lets you have many of the advantages of a language like Rust but with the improved productivity of working with a higher level language.

Re:Swift Server Work Group Annual Update by eptcyka on Friday November 01, 2019 @05:10AM (#21417201)
>Also, Swift has great interop with the C FFI, so you have access to every C library, and every Rust library with a C API to boot. I can think of maybe 3 Rust libraries that I'd want to interface with through their C api.
Re:Swift Server Work Group Annual Update by eecc on Thursday October 31, 2019 @03:50PM (#21412925)
I’ll burn a candle in favor of giving Node the Adobe Flash treatment it deserves.

(Burn karma burn!)

Re:Swift Server Work Group Annual Update by nielsbot on Thursday October 31, 2019 @03:34PM (#21412719)
TypeScript makes a big difference here...
Re:Swift Server Work Group Annual Update by Eric_WVGG on Thursday October 31, 2019 @04:00PM (#21413063)
I spent the better part of last winter developing in the article author’s Vapor server-side Swift project, which I found to be absolutely delightful (shout out to Tanner and the crew, you guys are amazing!)

The following summer I got a gig doing Typescript on both client and server; mostly the experience has highlighted to me how well designed Swift feels, and how stapled on and hacked Typescript feels. Do not like.

Re:Swift Server Work Group Annual Update by vosper on Thursday October 31, 2019 @08:06PM (#21415086)
> how stapled on and hacked Typescript feels

It is stapled on, though, right? Typescript is stapled onto Javascript. There's only so much they can do. I don't mean that as an argument for Typescript, more just that there are real constraints for the language developers.

Re:Swift Server Work Group Annual Update by ElFitz on Thursday October 31, 2019 @05:15PM (#21413777)
There is a world between the two when it comes to types. Even more so at run time.