Chapter 17. Other Programming Languages: Perl, Python, Ruby, and Java

This chapter covers some of the programming languages supported in Mac OS X: namely Perl, Python, Ruby, and Java.

As far as Perl and Python are concerned, Mac OS X is just another Unix. But Mac OS X versions of these packages have some niceties and some quirks that make things a little different from the developer’s perspective. In particular, many of Mac OS X’s non-Unix APIs, such as Carbon and Cocoa, are accessible through extension modules in both languages.

Warning

We suggest limiting your customization of the versions of Perl and Python that come with Mac OS X, since they are both fair game for modification during an upgrade or patch. You might unintentionally modify something that the system depends on, or end up with a partially broken installation the next time Software Update performs a big Mac OS X update.

It’s fine to install whatever modules you want, but if you choose to install customized or newer versions of either Perl or Python, install them in /usr/local so they don’t interfere with the ones in /usr. Check the documentation (INSTALL or README files) that came along with the source code for any information specific to Mac OS X, and for instructions for specifying an alternate installation prefix.

Java has been a part of Mac OS X from its very early days, but Ruby is a more recent addition, first bundled with Mac OS X 10.2 (Jaguar). Rails, the increasingly popular web application framework written in ...

Get Mac OS X For Unix Geeks, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.