Discussion in 'Mac Programming' started by smbbms, Jun 21, 2012.

  1. smbbms macrumors newbie

    Jun 21, 2012
    I'm looking to learn a new language. I have some knowledge about Java and C, so I'm looking for a scripting language to get into learning. I've narrowed it down to Perl, Ruby, and Python. From what I've read so far, Perl looks ugly but seems useful once you understand the syntax but I've read that it's hard to maintain later on if you haven't looked at your code for a while. Ruby looks similar to Perl, but just cleaned up a bit more. Python looks really easy to learn and it seems useful. It seems like a lot of companies are using Python. I'm not sure what I would use the language for. I guess right now, mostly for writing quick scripts to automate things but I may want to dive into web development with whatever language I choose. I'd like to pick a language that would help on a resume in the future. This could rule out Perl since languages like Python and Ruby are becoming more popular. Anyone have some advice? I'd prefer input from someone that has some experience using all 3 languages, because I know people that have only used one are pretty biased. Thanks.
  2. balamw Moderator


    Staff Member

    Aug 16, 2005
    New England
    Depends on what exactly you're trying to automate, but bash scripting is actually quite powerful and is often more portable than the other three. I've used Perl and Python, but not Ruby and these days many things I would have done in Perl are more easily done with bash.

  3. chown33 macrumors 604

    Aug 9, 2009
    I agree with learning to write bash scripts. Especially if, like the OP, "I'm not sure what I would use the language for." That might be the first question that needs to be answered, and only the OP can supply that answer.

    Bash is useful for automating other commands. And there are a wide variety of commands (e.g. sips, osascript, hdiutil, and zillions more). You can also write your own new commands in C, Java, or whatever. Oh, and python, perl, and ruby are also commands, so you can run them from an automated shell script, too.

Share This Page