Hacker News new | ask | show | jobs
by weegee101 4401 days ago
No, it doesn't. It is a great way to do 99% of the tasks most developers do. There is, and always will be, a place for Obj-C on the Macintosh platforms. Apple recognizes that most developers don't need the verbosity and tight-knit compatibility with C that Obj-C provides, and that is where Swift comes in.
1 comments

I see Objective-C been shown the door if Swift is successful, it just needs a few iOS and OS X releases, with C left around for the UNIX layer.

Lets say around XCode version 10 gets released.

That is extremely unlikely. Enough so that I would bet money on it.

Swift is targeted at the largest user base of the Obj-C language, the iOS developers. Obj-C will be around for a long time both for legacy purposes and because Swift doesn't interop with K&R C (unless that code has an Obj-C wrapper, like CoreFoundation), and C++ code. Since both Swift and Obj-C support using Cocoa libraries, any API added to Cocoa will be usable by both, but Cocoa is only one of many libraries in the Macintosh ecosystem.

Swift will become a replacement for the development the vast majority of people do, but that doesn't mean that Obj-C is going away. Apple has done nothing to indicate so; they've really been stressing the point that Swift is intended as a new tool to work along side your old one (Obj-C).

I remember Apple representatives promising to a room full of CERN researchers that the JavaBridge wasn't going away and how Java was a first class language for Mac OS X development.
This is not even remotely similar to that situation. Obj-C is far more important & integrated than I think you realize.
I know Objective-C since 1999, when I had to port some software from NeXT to Windows, so I do know a few things about it.

From my point of view, many will jump to Swift if given the chance.

You are misunderstanding - this isn't about which is better. Almost all new application code will be written in Swif, but swift doesn't bridge between C and the Swift/obj-c runtime, so Objective-C will continue to be required for writing the glue layer.
Yes, and I think people should head to Swift if it fits their needs. That is very different from Objective-C losing support however. Objective-C is not going away.
How many people actually wrote Cocoa apps in Java?

The only Java apps of the era that I remember used non-native UIs, and were painful.

Whereas I'd be shocked if Swift wasn't adopted wholesale by iOS developers.

This is not about the present.

Rather back when Mac OS X 10.0 was being released and Apple was unsure if developers would be willing to write Objective-C code.

They created their own JVM, with Objective-C runtime support (JavaBridge) and let the developers choose.

At the same time, Apple representatives did sessions at UNIX heavy user groups, like CERN, where they sold Mac OS X as a better BSD, and Java as first class language was part of the feature list.

As they saw developers were comfortable adopting Objective-C in their toolchains, the JavaBridge was dropped.

"C left around for the UNIX layer"

BSD is implemented in C, so it's not left around, it's the foundation of the system. The syscalls at the base level (read(), write(), socket(), fork(), etc,) are implemented in C and so are the tools that are used by virtually every programming language at some level. C is the standard upon which several abstractions are made, not just another programming language.

Oh I hit a nerve.

UNIX and C are symbiotic, so any UNIX system requires C, there is no way around it.

However everything else outside what POSIX requires can be done, and should be, in a more secure and productive language.