views:

678

answers:

9

This is probably a very simple question, but what is the technical term for this class of language?

They use an "intermediate" assembly type language which is sent through the JVM or CLR. They both are object oriented and they both depend on an intermediary such as the Java Virtual Machine or the Common Language Runtime to compile into native machine laguage.

Unlike Asm/C/C++ they don't compile directly into native machine language and require intensive memory allocation knowledge. They both use garbage collection.

Is there a technical term which seperates Java and C# from C++?

+26  A: 

A key difference between C++ and .NET/Java is the automatic reclaiming of memory that is no longer required. This is known as garbage collection. For this property, they are known as managed platforms.

Both Java/.NET delay the compilation of bytecode into native code until the last minute. For this property they are known as JIT-compiled (Just In Time).

The C#/Java/C++ languages are known as imperative, object-oriented languages.

The type system in both .NET and Java only allows verifiable invocation of methods. For this property they are known as statically typed.

C#/Java/C++ are Turing complete, meaning that, in practice, they can produce any calculation.

Drew Noakes
One might also say they are [http://en.wikipedia.org/wiki/ALGOL](http://en.wikipedia.org/wiki/ALGOL) based languages since that is the family from which they are derived.
James Fassett
There's a lot more to managed code than garbage collection; automatic validation and so on prove the code cannot behave in disallowed ways, for example. Garbage collected platforms are just called garbage-collected platforms :)
Calum
Calum is right: "managed" is not really about memory management.
Kristopher Johnson
garbage collected =/=> managed.
Greg D
How is Java Turing complete, and C#/C++ not? According to the [Wikipedia article](http://en.wikipedia.org/wiki/Turing_completeness), conditional branching is all it takes to be Turing complete, which isn't unique to Java. Am I missing something here?
Niels van der Rest
@Niels, have edited to relieve any confusion. Indeed even Windows batch files are Turing complete so yes, of course C# is too.
Drew Noakes
+1  A: 

'managed' or 'memory managed' or 'garbage collected' are all acceptable terms to distinguish them in terms of how memory is allocated/collected, though the first is arguably the most common nowadays.

As for compiling to an intermediate language (IL), it depends on how the virtual machine (VM) they run on works. In .NET the common language runtime (CLR) VM compiles the IL to machine code just before it executes, which is known as just-in-time compilation, or 'JIT compilation'. Other environments don't actually compile the code to machine code but simply interpret it, which is significantly slower, and this is known as an 'interpreted' language.

Greg Beech
+4  A: 

The intermediate representation is more a property of the runtime system than of the language itself. These types of systems are often called Bytecode systems.

Greg Hewgill
I've also seen the term "pseudo-compiled"
Guido
I agree with your point. This is especially simple to note in the .NET environment, where the runtime and the language(s) you can use to target that RT are more clearly different things.
Juan Pablo Califano
+1  A: 

I believe it would be managed languages.

Gerald
+4  A: 

Those languages are commonly referred to as 'managed' languages.

+3  A: 

Since Microsoft came out with .NET, they started using the word "managed" to distinguish between languages that, logically at least, run on a virtual machine, and those that run on the raw metal. The term has mostly caught on.

Barry Kelly
A: 

It depends, if you are talking about the fact they run on a virtual machine then they are regarded as JIT-compiled (Just-In-Time) or bytecode (logically 1/2 compiled and 1/2 interpreted).

If you are talking about the garbage collection then they are simply referred to as garbage collected.

The key point here is the two attributes are separate, a garbage collected language does not have to have a virtual machine and a virtual machine based language does not have to be garbage collected.

As an example Python is an interpreted language which has garbage collection, but it is interpreted as opposed to running on a virtual machine.

DrHazzard
+3  A: 

They are sometimes called statically typed managed programming languages.

milot
A: 

Intermediate "bytecode" representation is just an implementation detail. C++ can be compiled to, say, ANDF (Architecture Neutral Distribution Format). P-code used to be really popular. On the other hand, JavaCards are generally distributed without the ability to run the intermediate form, and there exists direct to machine code Java compilers.

C++ can be Garbage Collected. That should be more explicit in C++0x. Real-Time Java has restricted memory use for real-time threads.

So, a term for Java/C# type languages: Java dialects.

(Java is a trademark of Sun Microsystems, so is JavaScript.)

Tom Hawtin - tackline