Logged in as: Visiting Guest
 Site last updated: April 8, 2004

   Informal Language Comparison Chart(s)

This page was evolved from Armin Roehrl's Ruby site. If you have any corrections, ammendments or additions you would like to see on this chart, please send them to Language Chart Feedback. The content on this chart is open for criticism and feedback (as per the notes at the bottom of the chart).

You might also want to explore these other links. They do not represent the best descriptions or comparisons, nor do they represent the opinions or views of the providers of this website. They are a continually updated list, selected by searching the web for sites with meaningful content on the subject of comparing languages.

 

Ruby

Objective-C

Smalltalk-80 (as it was 20 years ago) (corrected)

S#
(SmallScript Corp's Smalltalk-98 Dialect Superset)

JavaScript 2.0 (ECMA Script)

C#

C++

Java

Python

CLOS

Typing

dynamic

dynamic/static

dynamic

dynamic with optional type declarations. Typing declarations are used statically and dynamically, as appropriate.

dynamic with optional type declarations

static

static

static

dynamic

dynamic

Runtime access to method names

yes

yes

yes

yes

?

yes

no

yes

yes

yes*

Runtime access to class names

yes

yes

yes

yes

?

yes

no

yes

yes

yes*

Runtime access to instance variable names

yes

yes

yes

yes

?

yes

no

yes

yes

yes*

Forwarding (Delegation, Distributed Objects and Proxies?)

yes

yes

yes

yes (Semantic Messages, Event Methods, etc)

?

yes (Event Methods)

no

no (?)

yes

??

Metaclasses

yes

yes

yes (all objects all the time)

yes (everything is logically an object; which means that classes have functions [methods] and within those functions [methods] <self/this> refers to the class; it also means that classes (instances of <Metaclass>) individually have their own [instance] class variables)

no

no (classes and methods are not objects)

no

no

yes

meta objects

Inheritance

single

single

single*

multiple (behavior is MI, structure is SI with MI-equivalent structure mixin acquired through transparent aggregation of concrete interfaces)

yes

single

multiple

single

multiple

multiple

Access to super method

super

super

super *

super, Superclass:super, thisContext, CallNextMethod,...

yes

yes

Superclass::method

super

(Python 2.1 syntax): super(MyClass,self).methodName

call-next-method

root class (supports classes?, supports per/instance prototypes?)

Object

Object (can have multiple)

Can be none, defaults to Object (can subclass from nil, superclass not required)

Object (also supports prototypes/instance-specific behavior variables, and properties)

Prototype Language

Object

none

Object

none

t or nil?

Receiver name

self

self

self

self (or this; true functions; thisContext for dynamic frame level reflection and MOP)

this

this

this

this

self

none, true generic functions

Private Data (by class?, by instance?)

yes

yes

yes

yes (on a class or instance basis)

yes

yes

yes

yes

yes

no

Private methods

yes

yes

yes

yes (selector namespaces provide runtime scoping)

yes (selector namespaces provide runtime scoping)

yes

yes

yes

yes

no

Class Variables

yes

no

yes (classes are objects, shared/pool variables also exist)

yes (classes are objects, shared/pool variables also exist)

yes

yes (static only, classes are not objects)

yes

yes

yes

yes

Interactive (Eval Facilities)

?

?

yes

yes

yes

no

no

?

yes

yes

Pre-emptively Multi-threadable (native threads?)

?

?

no (no host thread support; uses green threads -- it calls processes)

yes

yes

yes (SMP GC)

yes

?

? (almost)

no (some implementation support this)

Intrinsic Exception Model (native exception integration)

?

?

no

yes (very rich, zero-cost facilities)

yes

yes (but retry, and restart not allowed)

yes

?

yes  (a model exists)

?

Foreign Function Interface (cross language interop and marshalling)

?

?

no (requires hand built primitives - complicated to write)

yes (replaces need for primitives; language also supports inline C/C++/Assembly)

?

yes (intrinisc COM and Distributed Object Services)

yes

?

indirect  (via extension modules)

yes

Dynamic Reflection and MOP Facilities

?

?

yes

yes

?

Rich Static Reflection (limited MOP)

no (limited RTTI)

?

yes (but awkward)

yes (very rich)

Binding Predicates (including around, before, after, blocking, non-inheritable, etc)

?

?

no (but experimental packages exist)

yes

no

yes (predicates are not available for around, before, after behavior)

no

?

no

yes

Aspect Oriented Programming Foundation (per/instance read/write barriers, managed objects, method weaving, managed objects)

?

?

no (but experimental packages exist)

yes (not hi-level)

no

no

no (various expermental tools exist)

?

AOP features since Python 2.2 support this to one degree or another.

yes (experimental packages)

Calltime Dispatch Binding (late/dynamic)

?

?

yes

yes

yes

no

no (vtables and dynamic-casts provide weak/unsafe form of late binding)

?

Trivially true. (Support for generic and better is coming with 2.4/PEP 318).

yes

Multi-methods (overloading)

?

?

no

yes

yes

yes

yes (but restricted facilities)

?

No (strictly speaking). It is not seen that way, it is done in the class rather than the operator?

yes

Macro System

?

?

no

no (has simple if defined mechanism, language compilers are also present and are dynamically extensible)

no (has simple if defined mechanism)

no