Saturday, January 3, 2015

Java <-> Swift : a Niche Market?

If you followed along at all with the last post then you probably have some programming chops.

I'm going to keep up my journey of learning Swift for as long as I can.  These things have a way of running out of gas after a good long binge - usually when life catches up & starts demanding that you spend time paying attention to all of the things you have been neglecting in order to do heads-down-programming.

That being said, while I know many, many programming languages already, the two that I have been paid to write the most often have been Java and perl.

One thing that I have often lamented was the complete culture clash that existed between those two communities.  I could never fathom it since both communities purported to have the same goal: i.e. a cross-platform programming language.

Now that I've drunk enough Apple Kool-Aid to start sweating the stuff out of my pores I can truthfully say that I am *not* over the fact that Swift is completely inwardly-facing with regards to the Apple technology stack.  This is a major failing & it will dog this technology for as long as they continue to behave this way.

But I am determined not to let that fact keep me out in the cold again.  I made this mistake once with ObjectiveC already.

So what immediate benefit can I provide?  That is, if I wanted to get paid today to add value with the Swift language, what could I do?

Well the simple answer is that I can provide Java/Swift conversion services.  I am fully fluent in Java and I am coming up to speed on Swift as quickly as I can.  What I find interesting is that, as in many other languages, you can use the Java style when writing code.  What that amounts to is class-based namespaces and encapsulated functions that only return a single data type.

But how would you go the other way?  That is from Swift to Java?  The simple answer as I mentioned in the prior post is to make liberal use of Tuple as a return type.  Also you will want to have basic default 'Global' class to contain any standalone functions as class methods. 

What this amounts to is that people will end up falling into camps : those who regularly port to other platforms and those who choose to write in idiomatic Swift.  

The latter camp will predictably be snobs & will do everything possible to break external compatibility.  

That isn't me throwing rocks at Apple, merely at language zealots - because this pattern has been replayed in any language that you can mention during its adoption cycle.

What is all of this talk about writing code for other platforms?  If you are actually planning on releasing a "Mobile Application" and think that iOS is "enough" - then you're missing at least half of the potential market for your app.

THAT more than anything is the main reason to resent Apple's decisions regarding Swift - but as I have pointed out before - resentment can be overcome with tolerance.

No comments:

Post a Comment