Re: swift and objective-c
Re: swift and objective-c
- Subject: Re: swift and objective-c
- From: Jens Alfke <email@hidden>
- Date: Tue, 03 Jun 2014 11:13:14 -0700
On Jun 3, 2014, at 8:14 AM, Gordon Apple <email@hidden> wrote:
> My response was “Oh, no! 567 pages (iPad Retina portrait mode) of more s*** I have to learn.”
I was all “ZOMG a new language to study! Quick, where’s the reference manual?"
> One of the main advantages of Objective-C was that it was loosely typed. Now, it looks like we’re going back to a strongly typed language,
Not really (see previous replies.)
> nested functions (a la Pascal),
Why single out pascal? Most modern languages support functions as first-class data types. JavaScript, C#, Go, etc. (I hear the new version of Java is adding this too.) And Obj-C blocks are pretty much the same thing as nested functions; Swift calls them “closures” (a more widely-used term).
> everything is (or at least acts like) an object, etc.
Not really, at least not in the Smalltalk sense. But you can have methods on all types, which is extremely nice syntactically. Again, very common.
> I’m not at the conference, so I’m hoping the vids will expound on the rational for this highly disruptive change and show where it really buys us an advantage.
It’s not “disruptive” because Obj-C isn’t being deprecated, and bridges pretty seamlessly with Swift. You can keep using it and ignore Swift if you want. But it’s become pretty clear that C (and C++) are getting long in the tooth and need to be replaced, so there’s been a lot of activity in recent years on non-interpreted new languages like Go and Rust. The C foundation of Obj-C has really been hampering it, and it’s high time to move forward.
One thing to consider is that the unrestricted way C-based languages handle pointers is a nightmare for code optimizers, and really limits the extent of some optimizations. That’s the reason that a lot of super-high-performance numeric/scientific code is still written in FORTRAN, which doesn’t have pointers. Modern languages don’t have things like pointer arithmetic or arbitrary pointer type-casting, so they’re more optimizable.
One of the requirements for being a programmer is constantly learning new technologies, because things turn over rapidly. In 1995 it became pretty important to learn Java. In 2001 Objective-C came (back) on the radar. “Disruptive change” is the norm.
—Jens
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden