Shell scripts are fine for many purposes, but OS X comes with much more powerful scripting languages, as well as compiled programming languages. Here are a few.
Language
Command
To get started...
C, C++
gcc, g++[a]
gcc
g++
man gcc
http://www.gnu.org/software/gcc/
Perl
perl
man perl
http://www.perl.com/
PHP
php
man php
http://www.php.net/
Python
python
man python
http://www.python.org/
Ruby
ruby
man ruby
http://ruby-lang.org/
.NET
mono
man mono
http://www.mono-project.com/Mono:OSX
Java
javac
man javac
http://java.sun.com/
[a] These are not supplied with OS X, but are installed with Xcode.
3.22.242.141