back to article Server-side Swift's slow support story sours some: Apple lang tailored for mobile CPUs, lacking in Linux world

The Swift programming language has suffered some setbacks in its quest for ubiquity since Apple released it under an open-source license in 2015. In December, IBM said it had reevaluated its priorities and decided to back away from server-side Swift development. Then last week, Vapor Cloud, a server-side Swift hosting biz, and …

  1. Elledan

    What's Swift even supposed to do?

    As a former iOS developer (Objective-C) who never made the transition to Swift, I have to ask what Swift as a language targets. I know Apple created it to replace Objective-C, possibly to rid itself of decades of (NeXT) legacy. Yet Swift as a language seems to have no specific features that make it special, or so I thought.

    Now it's supposed to be efficient and memory safe? So it's like Rust, but presumably better? From the bit I have used both, they do seem quite similar, with the inferred type system, the abstract symbol-based syntax and a lot of features that seem to be inspired more by languages like JavaScript and Python.

    To be fair, I thought that Swift would be like Objective-C: just an Apple language which nobody outside of Apple's ecosystem would even touch, much like how Objective-C is practically dead now that Apple cast it to the side.

    1. Charlie Clark Silver badge

      Re: What's Swift even supposed to do?

      That's basically it: Apple wanted some kind of intermediary language for developers. In a sense it's competing with Dart and Typescript and the other also rans. Rust has at least carved itself a niche in the systems world. For the rest, it's increasingly looking like be able to compile to Web Assembly is all that matters.

      Apple hasn't helped by being lukewarm about the project: slow to open source it and not giving it the kind of resources Google likes to throw at projects. That said, it's probably got a dedicated group of happy users.

      1. Graham Dawson Silver badge

        Re: What's Swift even supposed to do?

        I wouldn't call typescript an also-ran, really. It's more like a feature preview for javascript about eight years from now.

      2. tekHedd

        Re: What's Swift even supposed to do?

        Particularly loving the downvotes by Typescript fanpersuns. I mean, it's less of an also-ran than Google Closure Compiler, but I'm comparing them to each other and that pretty much says it all.

    2. karlkarl Silver badge

      Re: What's Swift even supposed to do?

      "As a former iOS developer (Objective-C) who never made the transition to Swift, I have to ask what Swift as a language targets."

      I would say refresh yourself on your Objective-C. Apple is going to be back there soon enough.

      And not because Swift is unpopular on the server side, but because of native integration with C. A legacy that none of us can escape ;)

      1. Byz

        Re: What's Swift even supposed to do?

        Swift can talk to C via Objective-C classes.

        Swift 5 has introduced some interesting features including more runtime like Objective-C.

        I was using Objective-C as my main preference until Swift 5, Swift 5 is quite neat and there are a lot of great safe multithreading features that cannot easily be done in Objective-C (the new combine framework is very good).

    3. erikscott

      automatic translation?

      I've been peripherally involved in some machine translation projects in the (far) past, and I'm curious. Does anyone have a feeling for how hard it would be to write a Swift-to-Rust translator? Probably have to be a hybrid of a compiler and a macro substitution mess...

      Eons ago some of us did a Prolog ruleset that turned microsoft basic (with line numbers!) into Fortran 77. The mapping was really, surprisingly clean, and compiled Fortran on an Alpha totally clobbered Street Basic on a 386. :-)

      1. Anonymous Coward
        Anonymous Coward

        Re: automatic translation? .. have a look at TXL

        There are a whole bunch of grammars out there in TXL for various languages. You might find one that can be panel beaten into something you can use. TXL is the best tool I have found for transforming one language source code into another. Plus TXL can do lots of other tricks. But not as many as CLIPS.

      2. bazza Silver badge

        Re: automatic translation?

        I don’t know anything about Swift, but if it lets you do things with memory that Rust doesn’t (and Rust is very picky indeed, quite rightly given its goals) it might be impossible to translate compilable Swift into compilable Rust without using lots of unsafes.

        If anyone out there knows for sure I’d be interested to know (preemptive beer icon attached)

  2. trevorde Silver badge

    What the ecosystem needs...

    ... more Taylor Swift puns!

    1. ilovecookiez

      Re: What the ecosystem needs...

      No wonder it's struggling in the back-end.

  3. Tim99 Silver badge


    As any fule know, it must be run on the right server:-

    Mac Pro (Rack, 2019) - Technical Specifications. >>============>

  4. Psmo

    Problems of identity

    Server-side Swift isn't a lost cause. Rather it just needs to demonstrate proof-of-life.

    So... you're saying it's not quite dead?

    Sounds like a Python joke- no wonder they've had trouble finding their niche.

  5. thames

    Not much take up.

    The problem in this case is that IBM and a few others were looking for an alternative to Java for server-side use that wasn't tied in with a potential competitor, and as Apple had just come out with Swift, they thought this would solve that problem.

    However, Apple remained the driving force behind Swift and they had no real experience with or interest in third party server applications. IBM and friends on the other hand did, but were not able to build a viable community around Swift. Without that community the third party activity to build a large ecosystem of third party libraries and software tools never really developed.

    There's lots of fairly good programming languages out there. The few who make it past niche applications and hobbyists into the mainstream are the ones which build up a large and active community.

    For example, look at Python. It succeed on a shoe string and without corporate backing because of the community built up around it.

    I'm not surprised to hear this news about Swift, as the writing on the wall was evident years ago.

  6. bazza Silver badge

    x5 Speed Increase on Server Side with Swift?

    People must be using some terrible tools out there. Java?

    1. thames

      Re: x5 Speed Increase on Server Side with Swift?

      Take these performance numbers with a very large grain of salt. There's several problems with these sorts of comparative benchmarks. The first it that they are always micro-benchmarks with very little real content. A particular web framework may be a top performer at one micro-benchmark and down near the bottom on another. Have the various frameworks serve real data and they may start to converge on fairly similar numbers.

      Another problem is that the authors of these comparative benchmarks may know a few web frameworks, but they rarely know half a dozen or a dozen fairly well. For the ones they don't know they generally just google some tutorial examples and end up with a configuration that is very suboptimal and not uncommonly using deprecated methods. Someone who knew what they were doing with it might get a totally different set of numbers.

      A common problem is that particular frameworks may address scaling across multiple cores in different ways, but the author wants to make them all the same in order to be "fair". So he ends up using the best case for his favourite (and best known to him) framework while disadvantaging other frameworks who need a totally different set up.

      Yet another problem is that there was no indication of memory consumption, other than the author noted he didn't get any out of memory errors. RAM consumption is often more important than CPU load in real world web applications, but it's hard to come up with useful benchmarks without putting more work into each test than the author is willing to spend on it.

      Still yet another problem is that different frameworks may be oriented towards solving different problems. One may be oriented towards high volume web sites, while another may be oriented towards being able to set up a lower volume site with minimal man-hours and cost involved. The latter (smaller web sites) are far more common than the biggest sites.

      So while these comparative micro-benchmarks can be interesting at times, you generally need to know a lot about each one before you can tell if the author knew enough about what he was doing for the numbers to mean anything.

      So overall, take it with a grain of salt.

      1. unimaginative

        Re: x5 Speed Increase on Server Side with Swift?

        The Reg got who carried out the benchmarks wrong. They were done by a developer of the framework, with "the Centre of Excellence in Next Generation Networks just lending them hardware on an isolated network.

        There are a lot of issues with the tests. Apart from comparing frameworks with different priorities, they tuned their framework against the tests, and the way the other frameworks were configured was sub-optimal (to say the least):

        The Django test was particularly bad - but I do a lot of Django development so it may just be I spotted more there.

        1. thames

          Re: x5 Speed Increase on Server Side with Swift?

          That article in the link you provided is an excellent analysis. The author of the benchmarks cited in the Reg story was comparing apples to oranges from multiple different perspectives.

          I suspect the reason for this was benchmark author didn't really know much if anything about many of the frameworks he was "testing" and just googled some tutorial examples. The result was numbers that were measuring very different things in each case.

          This is such a common problem that it might make for a good series of articles for El Reg to publish if they can get someone (or a series of people) to write it for them.

          1. unimaginative

            Re: x5 Speed Increase on Server Side with Swift?

            Thanks, I wrote it.

  7. gannett
    Thumb Up

    I learnt Swift last year - now my brain is better.

    Fitting the slender demographic of mac owning old crusty unix hack with enough time on hands for something new, last year I chose to learn Swift. Coming from a Perl and C background it has taken a while to get head round objects and iterators but I now really like the newish language. I can really see how this modern language has made it possible to build more robust software from the ground up. Like INGSOC (from 1984 (the book by G. Orwell)) the language is structured and typed enough to remove dangerous (index out by 1) faults and common runtime problems. On the native Mac it has a low barrier to entry being usable for cmd line scripts without pre-compilation or linking and gives out helpful error message on parse failures. Good on-line documentation and tutorials available for free.

    Once off a Mac things do get tricky, Ubuntu installs are available, one right from the App Store, but they lack the support libraries for GUI building and multitasking and toolchain seems rather fragile and version sensitive.

    Overall a great language that has built on the best bits of older languages but may end up as the next Pascal.

    PS: Yes I mostly edit the src in Vim with colour coding package added but sometimes wander over to the Xcode dark side.

    1. Tim99 Silver badge

      Re: I learnt Swift last year - now my brain is better.

      Yes, I’m pretty much the same, with a background in C, and other stuff including Smalltalk which helped with the OOP thing. Initially I just wrote CLI stuff on the Mac with C, but I must say I do like Swift, I’m looking at moving a Database App I wrote about 20 years ago to an iPad (just as a hobby).

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like