What are the uses and pros/cons of different programming languages?

In summary, there are many different programming languages available, each with its own unique features and purposes. Some of the most common languages include C, C++, Java, .Net, HTML, XML, Perl, PHP, Pascal, Python, Tcl, Smalltalk, and J2EE. These languages can be categorized into families such as imperative, object-oriented, functional, declarative, and concurrent. Each family has its own distinct characteristics and can be implemented in other languages. It is important for programmers to understand the various languages and their uses in order to choose the most appropriate one for a given project.
  • #1
primal schemer
54
0
Hey all,

I'm not new to programming, but I feel like I need to gain more information about different languages and their uses.

Most of the programming I have done has been in C or C++ (although I don't really use much of the oop stuff in C++). If I ever neeeded an interface, I generally used Visual Basic or something like that. I've also used other language in my time, but not that much.

So, what are the other languages out there, and what are their pros/cons, or more specifically what would you use them for??

So I guess what I know now is:

c/c++ => Very fast, good for low level processing etc.

Java => A little slow, but has loads of functionality and is really well supported. Typically used for large applications (in business etc). Compiles to bytecode, so can be used on any machine

.Net (the whole thing) => VB (good for interfaces/GUIs), c# (is this like microsoft version of java?) not sure what else. Also .net programs compile to bytecode (or some variant of it), so should be transferrable to different machines, but not as well supported as java virtual machine. I guess a competitor of java?

HTML => Primarily for webpages, essentally places things on a page for display.

XML => Places structure on data, and associates metadata with objects (e.g. pictures)

Perl => Good for scripting files, i.e. running a program on a large number of files. But what else??

PHP, pascal, python, Tcl, smalltalk, J2EE => ?

Others => ?


What other languages are out there, and for what are they primarily used??

Thanks,

PS
 
Technology news on Phys.org
  • #2
ADA95

google GNAT

~~~
 
  • #3
There are tons of other languages out there. As a beginner nearly ever geeky kid from the eighties learned BASIC of some sort. Then there're other "languages" with rather limited syntax and application like PILOT and LOGO. Business oriented languages like COBOL and scientific programming languages like FORTRAN. Early AI (artificial intelligence) type programming involved languages like LISP and Prolog.
 
  • #4
There's different families of languages.

Imperative: C, Pascal etc.
Object Oriented: Smalltalk, Lisp (with CLOS)
Functional: Haskell, Standard ML (nearly functional), Lisp
Declarative: Prolog
Concurrent: Parlog

Imperative and object oriented languages tend to dominate the market and really aren't that interesting.

Functional languages are perhaps some of the most interesting languages to study. A lot of the "new" features being added to languages like C++ and Java are actually developments that were made in functional languages thirty years ago. Java's just been given generics in 1.5, which correspond to polymorphic functions in functional languages. Anonymous classes are also a weak attempt at emulating lambda functions in functional languages.

The mindset needed to program in a functional language is very different from that needed for a standard imperative one. As a rule, there are no variables, functions are first class citizens and recursion is the standard tool for iterating over a list. Programming in functional languages almost feels like you are programming in pure maths. For example, consider the mathematical definition of the Fibonacci series:

F(0) = 0, F(1) = 1, F(n) = F(n - 1) + F(n - 2)

is almost identical to the following Standard ML code:

Code:
fun f(0) = 0
| f(1) = 1
| f(n) = f(n-1) + f(n -2)

Declarative languages are also interesting. When programming in these languages, you generally tell the compiler/interpreter what the problem is and allow it to solve the problem. Contrast this with the imperative mindset of instructing the compiler how to solve the problem. Prolog, for example, is extremely good at expressing relationships between entities. These relationships are then analysed and, using a standard set of inference rules, new relationships and facts about the knowledge base can be found. This power is harnessed when writing knowledge bases.

Both functional and declarative programming languages are used extensively in artificial intelligence applications.

Concurrent programming languages are used for writing parallel programs, for example on a supercomputer. I've never really used any, so I wouldn't know any good examples to give.
 
  • #5
Java => A little slow, but has loads of functionality and is really well supported. Typically used for large applications (in business etc). Compiles to bytecode, so can be used on any machine

The "write once, run anywhere" motto espoused by Sun Microsystems is a joke. Only the most trivial of Java programs will behave in exactly the same way on a Windows machine as on a Sun box.
 
  • #6
LISP... Wonderful language.. it is a functional paradigm rather than imperative which is what all those other languages are.
 
  • #7
Curious3141 said:
There are tons of other languages out there. As a beginner nearly ever geeky kid from the eighties learned BASIC of some sort. Then there're other "languages" with rather limited syntax and application like PILOT and LOGO. Business oriented languages like COBOL and scientific programming languages like FORTRAN. Early AI (artificial intelligence) type programming involved languages like LISP and Prolog.

No, Stay away from basic. There really is no reason to learn it as a first language today.

Python has the simplicity of learning that basic has, but it is a powerful language that can be used for tons of different work from system programming to web programming.
 
  • #8
Dominic Mulligan said:
There's different families of languages.
Imperative: C, Pascal etc.
Object Oriented: Smalltalk, Lisp (with CLOS)
Functional: Haskell, Standard ML (nearly functional), Lisp
Declarative: Prolog
Concurrent: Parlog

No. you have 2 language families.

Imperative and Functional.

Being OO, or Declarative or Concurrent is a language feature that can be implemented in either functional or imperative languages.
 
  • #9
Which makes no sense. If you're going to analyse the families in that amount of detail you'll quickly discover that there's only one family: functional languages can have imperative features and imperative languages can have functional features.

Take a look at the boost library for C++. They've managed to implement a few functional features using templates and metaprogramming. Which one of your two families, therefore, does C++ belong in?
 
  • #10
Dominic Mulligan said:
Which makes no sense. If you're going to analyse the families in that amount of detail you'll quickly discover that there's only one family: functional languages can have imperative features and imperative languages can have functional features.
Take a look at the boost library for C++. They've managed to implement a few functional features using templates and metaprogramming. Which one of your two families, therefore, does C++ belong in?

you look at the core language, not the extensions.

C++ is an imperative language with object oriented features.

http://www.levenez.com/lang/history.html

There is a graphical representation of the languages.

Clearly you can see the separations.
 
  • #11
P.S.

Forth

A good forth will have
a 32 bit assembler built in...OOP also

~~~
 
  • #12
you look at the core language, not the extensions.

Look, my argument is pretty simple. You relegate object oriented languages from a family to a feature that can be implemented on top of other languages, leaving only two families, imperative and functional. The fact that object oriented features can be implemented within a language is not being disputed (CLOS et al).

However, it is perfectly possible to emulate the features of a functional language in an imperative language, so I'm at a loss as to why you decided to downgrade object oriented languages and keep functional as one of your two familial groups despite the fact that both feature sets can be emulated in other languages.

"Any sufficiently complicated imperative program has an ad hoc implementation of Lisp."

There is a graphical representation of the languages.

Clearly you can see the separations.

I don't really think that this supports your argument at all. You provide a taxonomic representation of programming languages and use this to support your assertation that there's only two families of languages? You'll need to explain how exactly it supports your arguments, I'm afraid.
 
  • #13
ComputerGeek said:
No, Stay away from basic. There really is no reason to learn it as a first language today.

I know and I agree. I'm referring to the eighties, back when I was a kid (a physical one, as opposed to my current state as a purely mental kid). :smile:
 
  • #14
Dominic Mulligan said:
I don't really think that this supports your argument at all. You provide a taxonomic representation of programming languages and use this to support your assertation that there's only two families of languages? You'll need to explain how exactly it supports your arguments, I'm afraid.

The basic issue is how the language functions below the surface.

The functional extensions in C++ still map to imperative operations, just as the OO extensions in LISP map to functional operations.

What you see when you type in a language is just the surface.
you need to investigate the language definitions to really see what distinguishes one from the other.
 
  • #15
How about C# ?
 
  • #16
Sprinter said:
How about C# ?

Worth looking at. You can use it to do system programming on windows and Linux (via mono)

but if you want to use it on both environments, try not to tie yourself down to the windows.forms library.
 

1. What is a programming language?

A programming language is a set of rules and symbols that allow a computer to perform specific tasks. It is used to write instructions or code that tells a computer what to do.

2. Why are there so many programming languages?

Programming languages are designed for different purposes and have different strengths and weaknesses. Some languages are better suited for certain tasks or industries, so developers choose the language that best fits their needs.

3. What are the main types of programming languages?

The main types of programming languages are high-level, low-level, and scripting languages. High-level languages are more human-readable and easier to use, while low-level languages are closer to the computer's machine code. Scripting languages are used for specific purposes, such as web development or automation.

4. How do I choose the right programming language?

The right programming language depends on your goals and what you want to achieve. Consider what you want to create or the industry you want to work in, and do some research on which languages are commonly used for those purposes.

5. Is it important to learn multiple programming languages?

It can be beneficial to learn multiple programming languages, as it allows you to have a diverse skill set and be more versatile in your development work. However, it is also important to become proficient in one language before moving on to others.

Similar threads

  • Programming and Computer Science
Replies
29
Views
2K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
8
Views
882
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
4
Replies
107
Views
5K
  • Programming and Computer Science
2
Replies
65
Views
2K
  • Programming and Computer Science
2
Replies
59
Views
7K
  • Programming and Computer Science
Replies
14
Views
2K
  • Programming and Computer Science
4
Replies
122
Views
13K
  • Programming and Computer Science
Replies
6
Views
2K
Back
Top