
Don’t bother with Swift for iOS development - 1bytebeta
http://www.1bytebeta.com/dont-bother-with-swift-for-ios-development/
======
Albright
Judging by the title, I figured we were in for a screed by an Obj-C holdout,
but _JavaScript?_ You want us to use _JavaScript_ for iOS development?

Did you forget the period in time where Steve Jobs was making that argument
and even _he_ got BTFO?

~~~
jbob2000
I think you missed a critical part of the article, where he quotes the creator
of WordPress as saying that PHP will just be used to communicate with the db,
with javascript doing the UI work (I'm paraphrasing a little).

I think that's what he's getting at. That writing your whole solution in Swift
or Obj-C doesn't make sense, because then you need to write a whole new
solution in Java for Android. Why not have the common components in
Javascript, with the specifics in the platform specific lanaguage?

~~~
harryf
Meanwhile Wordpress has failed so completely to establish itself on mobile
(e.g. SDKs developers can use to make their Wordpress content present in their
apps) that whole startups like Contentful (
[https://www.contentful.com](https://www.contentful.com) ) are springing up to
fill the gap

------
flippyhead
> Don’t we have enough programming languages already?

After this statement you've lost me. This is like saying: "Don't we have
enough new models of car already? Why develop new ones? My car gets 25 miles
per gallon!" As if new problems never crop-up or new, better approaches never
develop.

~~~
1bytebeta
Sorry, I guess I should have written ”enough programming languages to use for
iOS development.” Other than Obj-C you can compile iOS applications with
virtually any other programming language.

------
morio
The author has clearly never worked on a non-trivial mobile project. Today,
more so than ever, the two mobile platforms differ so drastically in APIs,
user experience and design that anyone seriously considering writing mobile
apps will have to do so using two different code bases if they want to have a
remotely usable app.

Portable frameworks might have a place where you target extremely simple like
forms based stuff. But even then I would personally never deliver something
like that to customers. I guess we all have different standards when it comes
to quality.

"A revamp of the language is already in the works". Of Javascript? Haha, that
is hilarious. Progress on ECMAScript has been a such boondogle in regards to
politics, glacial adoption rate of new features and other general fuck ups
that we will unlikely see something even close to a modern language in our
lifetimes. But, you know Linux on the desktop will take over the world anytime
now, won't it?

------
sanjeetsuhag
This isn't an argument against Swift for iOS development. Its an argument
against native application development.

------
doe88
> but surprisingly enough, _most newbies_ still prefer to learn Swift and
> focus on iOS [...]

This is quite condescending. I think there are merits to both choices: going
deeper with a native language exploiting all the intricacies of a platform or
going wider with an universal language such as JS. What you ultimately choose
as technology may depend on various factors there is no clear cut.

------
lxcid
I can't take anyone who promote JavaScript over any real programming language
seriously.

first, people build transpiler so that they can build and maintain large
codebase without losing sanity.

Then you have react that come with this great idea, immutability, so that they
can have saner codebase.

Much of what happen is due to the language deficiency. Which is why some would
have gone and consider language like Go.

~~~
ricksplat
But you are talking about swift here - net yet a 'real' programming language
per se ... But specifically in comparison with JavaScript? on an admittedly
superficial review of swift it looks quite similar to JS. so what's with the
'real'? Is it the maturity of the language? The base of developers who already
use it? It's yajs with access to the ios APIs.

------
AlwaysBCoding
I actually think we're at the point where it's an irresponsible business
decision to build an iOS app in Swift over Javascript in most cases. React
Native can target both iOS + Android with a much better development workflow
than Swift can offer.

Why on earth would you want to use Swift when it's harder and more time
consuming to implement, takes longer to learn, has worse library support, is
harder to hire for, and only targets one platform? Apple really dropped the
ball with Swift.

I suppose that "performance mandates it" is a valid reason for wanting to use
Swift. But I think for 95% of apps Swift is the wrong technology choice.

~~~
millstone
None of what you wrote is remotely true, except for the "targets one platform"
remark. Swift is very much superior to JavaScript, has better safety and
expressiveness, far fewer gotchas, and has vastly better library support on
iOS (how do you do Metal or AVFoundation in JS?) An ObjC developer will master
Swift much more quickly than a web programmer will master React Native, which
also requires understanding UIKit, so there is no hiring benefit.

Yes, React Native is a path to cross platform, but high quality cross platform
apps need OS-specific interfaces anyways. So what do you save?

------
thealistra
Did you hear about Phonegap, Titanium and all the write once, ship multiple
times frameworks? They are here for some time.

It's a hard to solve problem. Facebook was once doing a webapp for mobile and
it had an average of 1 star in the app store. Now hopefully they learned their
lesson and reiterating on an approach. Still it doesn't mean they'll get it.

There's also game development with Metal, how are you supposed to use
javascript for high quality rendering.

Swift will be needed and at the very least as a host for your javascript app.
And swift is a no brainer improvement over objective c. It's safer and modern.

~~~
1bytebeta
Thanks for your comment :)

I agree, there are many other frameworks I should have mentioned. As for high
quality rendering with Javascript --> WebGL?

------
dirkdk
Right now the best apps are still by far created with native code. The HTML
champions have said for 5+ years that HTML is the future but we are not even
close. Given that, I think it is safe to assume that the next 2-4 years native
code will still win.

~~~
bryanlarsen
Who said anything about HTML? One can use Javascript on iOS without using
HTML.

------
diggan
> Don’t we have enough programming languages already?

Completely disagree! We can never have enough languages! I'm excited about the
new languages to come, that will re-use the best ideas of the existing
languages and come up with new, helpful things.

Kind of disappointed with the article. Just because one language (in this case
JavaScript) is occupying the space and is "better" than another, doesn't mean
that the other language is irrelevant.

But then again I neither program with Swift or ObjectiveC. Or targeting iOS at
al so I might be completely wrong...

------
nnain
> I’ve decided to wait and see how it evolves ... After more than a year, I
> still can’t see the value in it.

You can't judge programming languages/efficiency/maintainability by observing
from the fence. I just completed the first Swift project. It's fun and easy to
work with. Not leaving Swift for JS (or Obj-C), anytime soon.

------
edgyswingset
This can be summarized as "Just use JavaScript because the web uses it", which
I think is silly.

------
nodamage
The only people that think Javascript is appropriate for native development,
are frankly, people whose only experience with mobile is writing trivial apps.
This was true five years ago and is still true today. The second you need to
do anything complex, you'll find yourself doing a lot of bridging back to
native code anyways.

And now you have two problems....

