Supersonic Man

June 19, 2014

the Swift programming language(s)

Filed under: Hobbyism and Nerdry,thoughtful handwaving — Supersonic Man @ 9:52 pm

So Apple is regretting the corner they painted themselves into by having their core development language be Objective-C.  This language is a horrid mashup made half of Smalltalk and half of traditional unreconstructed C.  Compared to C++, the modern half is more modern, but the primitive half is more primitive.  Steve Jobs used it for NeXT during his time away from Apple, and brought it back with him.  But what looked cool and exciting in 1986 is looking awfully outdated today.

The trend in the industry is clearly moving away from these half-and-half languages, toward stuff that doesn’t inherit primitive baggage from the previous century.  Microsoft has had great success by stripping all the old C-isms out of C++ to make C#, and Java — the oldest and crudest of this new generation of programming languages — may still be the world’s most widely used language, even though most people probably now see it as something that’s had its day and is not the place to invest future effort.

Now Apple has announced a nu-school language of their own, to replace Objectionable-C.  They’re calling it Swift.  It’s even more hep and now and with-it than C#. There’s just one problem: there’s already another computer language using the name.  It’s a scripting language for parallel computing.  Its purpose is to make it easy to spread work over many computers at once.  And this, to me, is far more interesting than Apple’s new me-too language.  (Or any of the other new contenders coming up, like Google’s Go or the Mozilla foundation’s Rust.)

See, massive parallelism is where the future of computing lies.  If you haven’t noticed, desktop CPUs aren’t improving by leaps and bounds anymore like they used to.  Speeds and capacities are showing a much flatter growth curve than they did five years ago.  You can’t keep making the same old CPUs faster and smaller… you run into physical limits.

And this means that if we want tomorrow’s computers to be capable of feats qualitatively beyond what today’s can do — stuff like understanding natural language, or running a realistic VR simulation, or making robots capable of general-purpose labor — the only way to get there is through massive parallelism.  I think that in a decade or two, we’ll mainly compare computer performance specs not with gigahertz or teraflops, but with kilocores or megacores.  That is, by the degree of parallelism.

One problem is that 95% of programming is still done in a single-tasking form.  Most programmers have little idea of how to really organize computing tasks in parallel rather than in series. There’s very little teaching and training being directed toward unlearning that traditional approach, which soon is going to be far too limiting.  Promulgating a new language built around the idea — especially one that makes it as simple and easy as possible — strikes me as a very positive and helpful step to take.  I’m really disappointed that Apple has chosen to dump on that helpful effort by trying to steal its name.



  1. In positive news, Google’s Go language also includes features designed to ease programming in parallel, through what it calls “goroutines”. Though admittedly the current implementation is not fully ready to support multi-CPU execution. And Rust may be even better, with compile-time safety checks that prevent threads from stepping in each other’s data.

    Comment by Supersonic Man — December 13, 2014 @ 1:09 pm | Reply

  2. But both Go and Rust are really designed for systems-level programming, in that they aim to bring modern compile-time protection to old fashioned low-level high-efficiency coding. Neither is very suitable for business apps (please don’t make me use the word “enteprise”), which benefit greatly from avoiding low-level detail. And low-level systems programming is, frankly, no longer what I would consider an interesting problem.

    So, what’s exciting on the business-app programming front? Not so much, really, though there are some interesting experiments. I think what’s wanted there is something more like the Opa language, an experimental project which aims to use a single syntax for all levels of a web app, from the database to the business logic to the client scripting. Or the haXe language, which doesn’t aim to implement all layers in itself, but instead to be compilable into intermediate code suitable for each layer.

    Trying to get all layers to use the same language is just one possible way of addressing the real problem, which is the integration and flow between the layers. For instance, we need to be able to design database relations and code objects against them without needing a thick translation layer. We need to find ways to avoid, for instance, having to manually recode a class declaration every time a table adds or changes a column. We need an approach where the shape of stored data is declared once, and that defines it syntactically in the language we use for business rule and UI coding, as well as the language we use for querying. We need to get away from SQL, which in complex cases is a write-only language that often obstructs, rather than aids, attempts to perform data joins in an efficient order. But we probably also need to keep the advantages of SQL instead of jumping whole hog into a “NoSQL” world where data is disconnected and inconsistent.

    And in business apps, the more we can automate low-level stuff, the better. We should have one-line ways of saying things like “populate this HTML table with columns from the following view selected by the following key, paged in groups of this many rows”. Or “Save the fields of this postback in that table or view, after validating it with this method”. Or “automatically update these fields from that data as it changes in real time”. Today’s web frameworks are working hard toward that kind of goal, but there’s a lot of ground to travel yet before any of those really happen in a single line.

    Comment by Supersonic Man — January 22, 2015 @ 4:03 pm | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at

%d bloggers like this: