Python, Java and the Mac
Paul Bissex takes a look at the situation on the Mac and finds that Java has been dumped in favor of Python:
Apple’s taking a gamble here. I imagine that among other factors they expect to get better, more Mac-like applications via PyObjC than Java. This will rankle the Java folks, of course. And when we see the first official tutorial on the Ruby-ObjC bridge the rioting will start. But Apple’s never been particularly averse to pissing off developers—often to the company’s detriment. I hope this works out happily.
Seriously, though, you don’t make progress without risks. Python has a lot more in common with Objective-C and the whole Cocoa framework than Java ever will.
This entry was posted at 9:58 pm on 17 August 2005 and is filed under Mac, Python. You can follow any responses to this entry through the post-specific RSS 2.0 feed.
Ah, that’s a good, and difficult question. Some things I like from Python:
- Indentation as block-delimeters. This reduces silly syntax noise.
- The emphasis on trying to find one clear way to do everything
However, from Ruby I love this:
- Blocks
- Smalltalk-style iterators
- More robust object-model, if not anywhere near Smalltalk, or Lisp.
It’s a trade-off which I’d use. Python is “more established” and has better libraries. It also is substantially better documented in my opinion—largely due to its origin in attempting to teach languages. It’s also, in my experience, faster, though that’s often not a major issue.
Honestly, I’m finding myself more interested in Ruby because of it’s support of blocks and better iterator support. If they could eliminate its Perlisms, I’d be happy.
I think Paul’s post takes the article too seriously. Yes, Apple posts these articles on their website, and doesn’t attribute them, giving them a very “official” air. However, the span of article content suggests that Apple likes publishing Mac programming success stories that contain useful information, not that Apple itself is endorsing a particular methodology as the One, True Way.
They’ve published stuff on just about every conceivable language, framework, or technology that can be used well and highlights the ease of programming on OS X. The facts that Apple has deprecated the Java-ObjC bridge, and also has published an article on PyObjC, have been conflated from the coincidence they really are.
Yes, programming in Python (or Ruby) under OS X is easy. But the truth is that Python updates are not yet available from Software Update, while Java updates are. Until Apple reverses that situation, I don’t think there’s any significance to Apple’s choice to publish Rentzsch’s article, beyond that it is a great article.
Peter,
Very sane points. I certainly don’t think regular Java support will be going away. I also didn’t mean to suggest that Apple somehow coordinated the two things, just that it’s an interesting moment.
I think what Apple realized is that the Java/Objective-C bridge was a pointless thing. Various people like Aaron Hillegrass (author of the best books on MacOS X programming) have said similar things. Use Java, or use Objective-C, but blending the two, no matter how technically brilliant the effort, was a bastard child.
Responses are currently closed, but you can trackback from your own site.
The cost to Apple to support Java was probably relatively high. Given the apparent weakness of Sun and Java, it makes perfect sense to me. I haven’t really done anything with Python or Ruby, other than read a couple of introductory tutorials. Which do you prefer, and why?