Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > All Other Coding Languages

Reply
 
LinkBack Thread Tools Display Modes
Old 07-20-2004, 10:32 PM   #1 (permalink)
Punch-M6.net
Registered User
 
Join Date: Jul 2004
Location: Australia
Posts: 21
Punch-M6.net is on a distinguished road
Post Comparison of Different Programming Languages

I've started to compile a list of pros and cons of various programming languages, partially from personal experience and partitially from various sources scattered around the net. I found it a useful activity for myself, and thought it might help others as well.

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.

.Net Environment
Not really a programming language, but closely related.

The .Net environment is a relatively new creation of Microsoft’s. It adds an overall cohesiveness to various programming languages by compiling them into a standard form that is interpreted by an intermediate language between the code and the OS. In this way it is similar to Java. The creation of the .Net environment means that the method of programming basically comes down to personal preference.

Pros:
· Easy-to-use tools may increase programmer productivity
· Has a strong framework for building rich graphical user interfaces
· Gives developers choice of working in more than 20 programming languages
· Is tightly integrated with Microsoft's operating system and enterprise server software
· Has built-in support for Web services standards

Cons:
· Users of prior Microsoft tools and technology face a potentially steep learning curve
· Choice of integrated development environments is limited
· Getting older applications to run in new .Net environment may require effort

I'll come back and add more as I update the list.

Last edited by Punch-M6.net; 07-22-2004 at 08:09 PM.
Punch-M6.net is offline   Reply With Quote
Old 07-21-2004, 03:11 AM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,151
Belisarius is on a distinguished road
As a Java fanboy, I have to disagree with the comment that Java is slow. That *used* to be the case, but in the majority of cases it's roughly on par with C and C++. While you're right it's compiled at runtime, the JVM can be far more intellegent about the system when executing the code than a stand-alone C app can. Throw in garbage collection, and you see a significant improvement.

I will cavet this by saying that AWT and Swing are the exception, as they tend to be slow. So if you judge Java by graphical applications, then yes, Java is slow.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 07-21-2004, 09:54 AM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
don't forget mono!

http://www.mono-project.com/about/index.html

as i have used it myself, i was pretty amazed i was compiling a socket program on windows and running it on linux in .net

i know it's not fully supported yet, but it will be cool as they make more progress.
__________________
Mike
sde is offline   Reply With Quote
Old 07-22-2004, 08:06 PM   #4 (permalink)
Punch-M6.net
Registered User
 
Join Date: Jul 2004
Location: Australia
Posts: 21
Punch-M6.net is on a distinguished road
My experience with Java was primarily in programming an Applet game (which I expected to be slowish) and using AWT and Swing. However, when I was first learning Java at high school (two years ago now, admittedly) we were compiling and running simple command-line programs on P200s, and these were noticeably slower than C++ programs on the same machines.

Mono looks pretty cool. I'm going to have to look into it when I get some time.

I'm also going to edit the list, as a couple of points have been brought to my attention, notably that the .NET framework apparently doesn't just work on Windows, that saying that misusing C will 'horribly break' your computer was a bit too exaggerated and that while C++ is, technically, slower and larger, you're not really ever going to notice the difference.

Thanks!

Edit: Oh, yeah. Forgot to mention. If anyone else has knowledge of other languages and want to write up something similar, please post your thoughts on the language. I'm trying to learn a little about as many languages as I can. Thanks.
Punch-M6.net is offline   Reply With Quote
Old 07-23-2004, 02:56 AM   #5 (permalink)
Amaranthine
Registered User
 
Amaranthine's Avatar
 
Join Date: May 2004
Posts: 47
Amaranthine is on a distinguished road
I agree with the fact that java is slow.
Though I disagree that c++ isn't noticeably slower than c.

(sadly I don't have this experience, I'm not good enough to write anything cpu intensive )
A friend of my fathers (and I suppose of mine) has been a programmer for many years. He wrote a large scale encryption program for some japanese company, he wrote it in C, ended up rewriting many of the basic functions such as memcpy because they were too slow. He also went back through his compiled code and rewrote pieces of the assembly to speed it up. Anything else would have simply been too slow.
Amaranthine is offline   Reply With Quote
Old 07-23-2004, 03:19 AM   #6 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,151
Belisarius is on a distinguished road
Do I need to bring back the The Java is Faster than C++ and C++ Sucks Unbiased Benchmark?
__________________
GitS
Belisarius is offline   Reply With Quote
Old 07-27-2004, 11:04 PM   #7 (permalink)
Punch-M6.net
Registered User
 
Join Date: Jul 2004
Location: Australia
Posts: 21
Punch-M6.net is on a distinguished road
Randolpho on another forum added these items to the list, and I thought they should be added here as well:

Quote:
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.)

C#:
Pros:
- Properties syntax makes EJB specifications look stupid. pwned
- Autoboxing
- Operator overloading (something Java is sorely missing)
- Function delegates
- All the pros of .NET, including easy deployment
Cons:
- Autoboxing -- overhead for wrapping primitives in an object can severely hamper even well-written programs.
- Namespaces suck compared to Java import methods.
- Function delegates are nice to have, but the implementation is cludgy (takes like three steps to create one, and they're actually separate objects, which means more overhead).
- Poor use of symbols when a keyword would suffice. Does replacing ":" for "extends" really do anything other than "woo" c++ programmers? Yes it does, it makes the code harder to read.
The Java Being Slow comment seems destined to be argued about forever, so I guess people should just take it as personal opinion and have a play to see what they find themselves
Punch-M6.net is offline   Reply With Quote
Old 07-29-2004, 08:14 PM   #8 (permalink)
Punch-M6.net
Registered User
 
Join Date: Jul 2004
Location: Australia
Posts: 21
Punch-M6.net is on a distinguished road
I've compiled a bit of a list for Delphi. Most of these points came from a Delphi textbook that was written a couple of years ago, so they could be incorrect now, but I don't think that these particular points would have changed. I haven't had a whole lot of interaction with the language.

Delphi
Delphi is, at heart, a Pascal compiler. It was designed to be a visual rapid application development environment without the limitations of other similar products. Delphi was the first to combine a visual development interface, an optomising native-code compiler, a scalable database access engine and other features.

Pros:
- Rapid development environment that is very fast to make programs in.
- Easy to learn and program in.
- Faster compiler than many other languages
- Powerful database architecture that can be changed if desired
- Solid OO Design encouraged, helping to keep code clean.

Cons:
- Visual Studio's interface is more customisable.
- VB can edit code while in Debug mode but Delphi can't.
- Compiled code is slightly slower than (good) C and C++ compilers'
- No operator overloading
Punch-M6.net is offline   Reply With Quote
Old 08-03-2004, 08:13 PM   #9 (permalink)
npa
Code Monkey
 
Join Date: Jul 2003
Location: canada
Posts: 82
npa is on a distinguished road
it's not a con that java does not allow explicit memory manipulation.

and java will always be slower then c++, but the slowness is not noticable for the majority of applications that it is used for.
__________________
direct entry file specification.
npa is offline   Reply With Quote
Old 08-03-2004, 08:14 PM   #10 (permalink)
npa
Code Monkey
 
Join Date: Jul 2003
Location: canada
Posts: 82
npa is on a distinguished road
further, c# doesn't having "autoboxing", it doesn't actually have any primative types at all, there is nothing to "box".
__________________
direct entry file specification.
npa is offline   Reply With Quote
Old 08-03-2004, 08:16 PM   #11 (permalink)
npa
Code Monkey
 
Join Date: Jul 2003
Location: canada
Posts: 82
npa is on a distinguished road
and all programming languages (sdk's) are free - it's the IDE's that cost money.
__________________
direct entry file specification.
npa is offline   Reply With Quote
Old 08-03-2004, 08:17 PM   #12 (permalink)
npa
Code Monkey
 
Join Date: Jul 2003
Location: canada
Posts: 82
npa is on a distinguished road
and a major "pro" of java/c# languages is the inbuilt
exception handling mechansim
__________________
direct entry file specification.
npa is offline   Reply With Quote
Old 08-03-2004, 08:33 PM   #13 (permalink)
Punch-M6.net
Registered User
 
Join Date: Jul 2004
Location: Australia
Posts: 21
Punch-M6.net is on a distinguished road
Pros and Cons are largely relative, I guess. But it is often stated that the lack of memory manipulation in Java is missed by C, C++ programmers.

I've always noticed a problem with Java's speed. The last time I was using it (about a year ago) we had to make our programs in BlueJ for Uni... and that was horrible. Exceedingly slow, prone to freezing and not really a particularly useful development environment. I don't like BlueJ (I do like Java, though. I just preferred writing it in Notepad during college).

And I've never used C#, and wasn't entirely certain what 'autoboxing' meant, so I just took it on faith that the person who wrote the C# list knew more than me.

Thanks for your information!
Punch-M6.net is offline   Reply With Quote
Old 08-03-2004, 10:25 PM   #14 (permalink)
Punch-M6.net
Registered User
 
Join Date: Jul 2004
Location: Australia
Posts: 21
Punch-M6.net is on a distinguished road
NeoNemesis on another forum wrote this for QBasic (Which I didn't even know was still around, so there you go. It's apparently up to version 7.1 and now includes a compiler).

Quote:
Quick Basic
Quick Basic is one of the easiest languages to learn.

Pros:
-Extremely Easy to learn
-Somewhat flexible as to what you can do
-Also somewhat powerful as to what you can do
-Can be compiled into a .exe file for use with other systems and can be used as a stand-alone program

Cons:
- You can't do as much with it as the other languages.
By 'Somewhat flexible and powerful' I assume that it's not particularly
Punch-M6.net is offline   Reply With Quote
Old 08-03-2004, 11:11 PM   #15 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Quote:
Non-trivial programs aren’t easily ported if they use platform-specific libraries (e.g. DirectX etc.)
This has nothing to do with C++. C++ never heard of DirectX.
__________________
Valmont is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
which programming languages do you know? ashish Lounge 11 10-27-2004 02:02 PM
Windows Programming Help Amaranthine Standard C, C++ 4 05-14-2004 12:48 PM
CLI for noobies: shell programming sde Code Newbie News 0 03-15-2004 12:33 PM
For those who have Learned C from "The C Programming Lanuage" DemosthenesB Standard C, C++ 5 07-13-2003 12:22 AM
Functional vs. Imperative Programming AOL User Lounge 2 04-16-2003 11:01 PM


All times are GMT -8. The time now is 10:00 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting