# programming languages compared



## technomodel (Dec 21, 2004)

Ok, here's something i think may be of a lot of help to some people.here is a list of the pros and cons of some of the programming languages used by developers that i came across on the net.the list is by no way exhaustive and may have inaccuracies,and so it will of great help if other forum members contribute in this thread too.

*Java*
Programming in Java is very similar to C/C++ development. It is object-oriented and well structured. There is wide usage of Java, and therefore there are a lot of libraries around that can be used in your Java program.

Pros:
Â· Java is platform independent, it can be run on everything.
Â· Itâ€™s free, you can just download the SDK and go.
Â· Itâ€™s easy to learn if you know C or C++.
Â· Provides automatic memory management.
Â· Large library of pre-built classes and many more available from around the net
Â· Itâ€™s quite safe. Itâ€™s fairly hard (if not impossible) to damage your computer through programming in Java.

Cons:
Â· Speed. Java is quite slow, because it is essentially compiled at run-time by the systemâ€™s virtual machine.
Â· Difficult to compile into a stand-alone application.
Â· Memory pointers not allowed.
Â· Some people dislike being forced into object oriented programming. But thatâ€™s their problem. 

*C*
C has been around for years and has a large following. It is used by many, many different people around the globe. Many other programming languages were written in C.

Pros:
Â· Large usage base. Easy to find help, other programmers, libraries etc.
Â· Simple core language, with further functionality being added through the use of libraries.
Â· Very powerful. If your computer can do it, it can do it through C.
Â· Low-level unchecked access to computer memory using of pointers.
Â· One of the fasted running languages.
Â· C code can be used in C++ applications.
Â· Programs are compiled and stand alone, no need for interpretters (sometimes external libraries will need to be installed on the target PC).

Cons:
Â· Relatively difficult to learn.
Â· Very little safety net. If you choose (accidentally or otherwise) to make a program that will access memory incorrectly and cause problems with your system, it wonâ€™t stop you. It only pulls you up on compile errors.
Â· Non trivial programs could be hard to port. Programs have to be compiled for each specific platform.
Â· Not strictly object oriented.
Â· Code can get messy easily.

*C++*
C++ is a derivation of the C programming language. C code still works in C++ programs. It is an object-oriented language and very powerful.

Pros:
Â· As close to a universal programming language as youâ€™re likely to get at the moment. Itâ€™s used everywhere.
Â· Object oriented technology included, highly supported and recommended, but not forced upon you.
Â· Programs are stand alone, no need for interpretters (sometimes external libraries will need to be installed on the target PC).
Â· Easy to port to other platforms if standard C++ guidelines are adhered to.
Â· Many libraries available for added functionality.

Cons:
Â· Quite difficult to learn. Youâ€™ll never really stop learning new things about it (which is also a pro, I guess)
Â· Non-trivial programs arenâ€™t easily ported if they use platform-specific libraries (e.g. DirectX etc.)
Â· Programs can be slightly larger and slower than those programmed in C (although it's highly unlikely that you'll notice the difference)

*Visual Basic*
Visual Basic is a very easy language to use. Itâ€™s code is similar to Pseudo-code, and many times the developer can simply type what they think should work and it does. Which is cool.

Pros:
Â· Very easy to learn
Â· Quick to implement an application or algorithm
Â· Lots of in-built functionality
Â· Recently added complete OOP support with the .Net upgrade.

Cons:
Â· Not as flexible as other languages. Canâ€™t do as much.
Â· Runs slower than C/C++
Â· Purely a Microsoft product and Windows based.


*Python:*
Pros:
- One of the easiest to learn fully object-oriented language on the market.
- Both functional and object oriented; caters to both sides of the design methodology debate.
- No curly braces for code blocks: blocks are determined by indentation.
- Very rich, both fully OO and fully functional set of libraries
- Easy to use native invocation
- Slicing, Lamda functions, and Lists, oh my!
- Named for Monty Python, and they're damn cool.
Cons:
- Comparitively slow (but still faster than VB! w00t).
- No curly braces for code blocks: blocks are determined by indentation.

*PHP:*
Pros:
- Speed -- fastest web-application scripting language out there, bar none. Yes, faster than ASP, faster then ASP.NET, faster than JSP, faster than the Python web aps (Zope, Twisted), faster than Coldfusion.
- very rich very fast library of functions
- library functions are mostly thin wrappers of mature c functions.
Cons:
- OO is tacked on, and kludgy at best.
- syntax (especially for OO) can get in the way.
- library functions are mostly thin wrappers of mature c functions.
- Poor error handling support in the library (PHP 5 finally introduced try/catch blocks, but they're not implemented to my knowledge in the library. Yet.)


*DISCLAIMER:*
Among the different languages mentioned here, the only one i know is C.so I hereby state that i'm in no way responsible for the misinformations that may be present in the description of the other languages.   

courtesy:*codenewbie.com/forum/showthread.php?t=2142&highlight=comparison+programming+languages


----------



## NikhilVerma (Dec 21, 2004)

technomodel said:
			
		

> *Python:*
> Pros:
> - One of the easiest to learn fully object-oriented language on the market.
> - Both functional and object oriented; caters to both sides of the design methodology debate.
> ...



Why is it both a pro and a con ??


----------



## technomodel (Dec 21, 2004)

i dont know for sure. but think that  the pro of indentation is that you dont need to count how many braces you have used to make sure you ended a block or a loop.but the prob with indentation is that you need to make sure of the number of times u press the spacebar or tab(if u'r using editors like vi or notepad),or else use a word processor.

but a wild guess though.waiting for an expert opinion.


----------



## swatkat (Dec 21, 2004)

Anyone tried IBM's REXX programming language?It's now Open Source!


----------



## geekgod (Dec 23, 2004)

that was a neat one techno.very useful for n00bs like me  .
btw,can any of you tell me what is this "visual" thing?i mean i've heard of visualjava,visualc++etc.also heard they have been developed by microsoft.but what is the difference between them and the normal c++ and java?


----------



## icecoolz (Dec 23, 2004)

> Speed. Java is quite slow, because it is essentially compiled at run-time by the systemâ€™s virtual machine



Thats not true. Java is a write once run anywhere software. It gets compiled on one JDK or JRE and the resultant class files can be run on any machine which the JRE installed. It doesnt get compiled again by the VM. 



> btw,can any of you tell me what is this "visual" thing?i mean i've heard of visualjava,visualc++etc.also heard they have been developed by microsoft.but what is the difference between them and the normal c++ and java?



Dont get confused between the visual and normal stuff. Basically all programming languages now enable you to do whatever you do using the visual tools. You have 2 choices when you are going to build a GUI tool. You can either sit and write lots and lots of code or you can use the visual tools and use drag and drop features to get eh GUI and let the tool generate the code for u. These are called RAD (Rapid Application Developement) tools or IDE's (Integrated Development Environment). They are still either C++/Java code but just easier and faster to use.


----------



## geek_rohit (Dec 25, 2004)

Well mate I had learnt FoxPro in my school days. I thought that it was a very simple and easy to learn language, with some decent DBMS capabilities. You could create some nice softwares in it. Wonder why it wasn't improved further. It deserved a longer life, Alas.


----------



## GNUrag (Dec 25, 2004)

icecoolz said:
			
		

> Thats not true. Java is a write once run anywhere software. It gets compiled on one JDK or JRE and the resultant class files can be run on any machine which the JRE installed. It doesnt get compiled again by the VM.


True, it doesnt get compiled again, but the worst thing is still to come... The ByteCode is yet to be interpreted... and by any logic, interpretation of bytecode is surely gonna suck all the processing power... I've seen dual processor servers come down to knees while running a couple of Java based applications.... 

Java does have many many features, its Swing library is the richest one in terms of widets, but the only thing that holds it back is its resource hungriness..

Python, is the best alternative to OO / Procedural programming ... you must have to use it to believe it... I'll continue more with Python if people are interested...


----------

