Thread: More languages?
View Single Post
Old Dec 8th, 2005, 7:07 AM   #6
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Learning programming languages is slightly different from natural languages. Compared to programming languages, natural languages have a hugely complex syntax, and a gigantic dictionary of semantics. In addition, there is much more overlap between programming languages than there is between computer languages.

For instance:
if x == 1:
   print "X is 1"
------------------------------------
if (x == 1) {
   System.out.println("X is 1");
}
------------------------------------
if (x == 1) {
   printf("X is 1");
}
------------------------------------
if (x == 1) {
   cout << "X is 1";
}
------------------------------------
if x == 1
   print "X is 1"
end
------------------------------------
print "X is 1" if x == 1;
------------------------------------
IF x = 1 THEN
   PRINT "X is 1"
ENDIF
------------------------------------
(when (= x 1) "X is 1")
------------------------------------
if [ x = 1 ]
then
   echo "X is 1"
fi
All from different languages, but all rather similar. Thus, the confusion that arises is less so than one might initially expect.

There is, however, an awfully large difference between the performance of different computer languages in different situations. A book written in English will not be significantly shorter or longer than the same book written in German. A program written in C will be significantly faster than a program written in, say, Ruby - and likewise, a program written in C will probably take a lot longer to write than one in Ruby!

Some programming languages, such as Perl, appeal to quick scripts and fast results. Others have libraries that make them especially good for certain tasks. Python's Twisted networking library, for instance, makes it an ideal candidate for creating custom network clients and servers in.
Arevos is offline   Reply With Quote