HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Which object-oriented programming language is the closest to the untyped sigma-calculus?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
orientedtheuntypedcalculusprogramminglanguagesigmaclosestwhichobject

Problem

I'm wondering which of the dynamic object-oriented (or prototype-oriented) languages (like JavaScript, Ruby, Python, etc.) can be considered as the closest to Abadi and Cardelli's untyped sigma calculus?

Solution

JavaScript looks perfectly like untyped sigma calculus.

It supports first-class citizens, described in paper concepts in terms of prototypes, closures, clone (called split), (dynamic) method override, objects dynamic creation, extension, delegation, subsumption, object fragments and polymorphism (which is understatement in terms of this language). Essentially it supports every operation described in the paper.

Since it uses prototype based inheritance the update of methods is one of the basic operations in this model. It recently started to support hierarchical class inheritance (but it was not needed, since emulating any kind of hierarchical behavior is possible with very short code).

Origins of Cardelli work predates the creation of JavaScript, but also worth mentioning is that JavaScript description as general purpose any language emulator with very short code to support such was described by Don Knuth (which predates Cardelli work, no connection between Knuth paper and creation of JS was ever made in any direction, but both papers exactly describe the JS properties).

Other languages fail with method backups or dynamic method override. But this is not the case for other prototype based languages (at least the most populqr ones), which fully support $\varsigma\text{-calculus}$ (take for example "Self").

Context

StackExchange Computer Science Q#57129, answer score: 4

Revisions (0)

No revisions yet.