
[新言語 Swift:image]
Cocoa の優れた教師と考えられている Aaron Hillegass の意見とそれに対する反論が興味深い・・・
Big Nerd Ranch: “iOS Developers Need to Know Objective-C” by Aaron Hillegass: 11 June 2014
* * *
iOS デベロッパにとって Objective-C の知識は必要だ
アップルが Swift を発表したとき、少なからぬひとびとが「万歳! これで Objective-C を習わなくても iOS デベロッパになれる!」というのを聞いた。そんなひとに3つのことをいいたい。
When Apple announced Swift, I heard a few people say “Hurray! Now I can be an iOS developer without learning Objective-C!” I have three messages for these people:
・もし iOS デベロッパになりたいのなら、やはり Objective-C の知識が必要だ
・Swift は Objective-C より学習がカンタン
・いったん Objective-C を習得すれば、Swift の学習がカンタンになる
– If you want to be an iOS developer, you will still need to know Objective-C.
– Objective-C is easier to learn than Swift.
– Once you know Objective-C, it will be easy to learn Swift.
しかしはっきり告白しておきたいが、Swift に対して自分は大きな愛情を抱いている。シンタックスは美しい。Swift のコンパイラはたくさんエラーを見つけてくれる。みんなが Swift でコードを書くようになったらアプリの信頼性は格段に増すだろう。enum 型コンストラクタは素晴らしい。iOS および Mac OS X エコシステムにとって Swift は大きな前進だ。それはさりながらしかし・・・
Before I proceed, let me preface this with a confession of love for Swift. The syntax is lovely. The Swift compiler will catch so many errors for us; I’m certain that when everyone is coding in Swift the reliability of apps will improve considerably. The enum construct is gorgeous. Swift is a major step forward for the entire iOS and Mac OS X ecosystem. But…
* * *
まず John Gruber のコメント。
Daring Fireball: “Aaron Hillegass: ‘iOS Developers Need to Know Objective-C’” by John Gruber: 11 June 2014
時間の問題だ
第1点と第3点については合意するが、第2点については確信が持てない。真の問題は時間なのだ。現在の時点でいえば、本格的な Mac および iOS デベロッパが Objective-C の知識を必要とすることは議論の余地がないだろう。しかし1年後はどうか? 2年後、5年後はどうか? いずれかの時点で、「Objective-C を学ぶ必要はあるのか?」という問いに対する答えは「ノー」になるだろう。それがいつかは分からないけれど・・・
Points 1 and 3 I agree with. Point 2, I’m not so sure about. But the real question is time. I don’t think anyone would dispute that a serious Mac or iOS developer needs to know Objective-C today. But what about a year from now? Two years? Five? At some point, the answer to “Do I need to learn Objective-C?” will be “No.” I don’t know when that will be.
自分は Swift の先行きについてには楽観的だ。それは新規のデベロッパに対するアピールが大きいからではない(それもいずれは利いてくるだろうが)。そうではなく、すでに Objective-C とアップルのフレームワークを熟知した膨大な数のデベロッパにアピールすると思うからだ。
I’m bullish on Swift’s uptake not because I think it will appeal to new developers (although eventually I think that will help too), but because I think it appeals to the huge base of developers who already know Objective-C and Apple’s frameworks.
* * *
その点について Marco Arment がもっと詳しく述べている。
Marco.org: “iOS Developers Need to Know Objective-C” by Marco Arment: 12 June 2014
数年もすれば Swift だけの時代に
Aaron Hillegass の意見に同意するが、それはあくまで短期間での話だ。今後1、2年の iOS 開発については、多分 Objective-C の知識を持つべきだろう。しかし数年後には Swift だけでも問題なくなるだろう。
I agree with Aaron Hillegass, but only short-term. If you want to develop for iOS in the next year or two, you should probably know Objective-C. But in a few years, I don’t think it’ll matter if you only learn Swift.
* * *
今後数年で大きく変化
Swift はまだ若い言語なのでアップルでさえ Swift コードを含むアプリはたったひとつしか出していない。WWDC アプリがそうだ。先週多くのアップルエンジニアの話を聞いたが、私たち同様彼らも Swift の存在すら知らなかった。Swift は最先端の言語なので、今後数年で大きく変化するだろう。更に重要なことは、フレームワークも一般に受け入れられている最適手法も今後10年間で劇的に変わるだろうということだ。時がたって、今年書かれた Swift コードを後から振り返ればゾッとするだろう。
Swift is so young that even Apple has only shipped one app — the WWDC app — that contains any Swift code so far. I talked to many Apple engineers last week who hadn’t even learned of Swift’s existence until the rest of us did. The language is bleeding-edge and likely to change rapidly over the next couple of years, and more importantly, the frameworks and commonly accepted best practices are likely to change dramatically over the next decade. In time, we’re going to look back in horror at the Swift code we write this year.
* * *
Objective-C は C や C++、アセンブリー言語並みになる
だからといって Objective-C の理解が iOS デベロッパにとって長期間必要条件だという意味ではない。今でも多くのひとが C についてほとんど知らないまま(C++ については何も知らないまま)Objective-C だけでたくさんのアプリを毎日のように書いている。
But that doesn’t mean that Objective-C proficiency will be a requirement for iOS developers for very long. Plenty of people write plenty of apps every day in Objective-C without knowing most of C or any C++.
いずれ Objective-C の知識が C や C++、アセンブリー言語のそれと同じようになる時期がくるだろう。それはアプリケーションコードの下部にある配管構造のように、殆どの現役デベロッパにとって知る必要もなければ、いじる必要もないものになるだろう。5年もすれば間違いなくそうなると思う。もしかしたら2、3年後かも知れない。
The time will come when knowing Objective-C will be like knowing C, C++, or assembly — it’ll be a plumbing layer beneath your application code that almost all working developers will never need to know or interact with. And I bet that time is less than five years away — possibly just two or three.
* * *
Swift だけで済む時代は意外に早く来るかもしれないということか・・・
★ →[原文を見る:Original Text]
Read Full Post »