Posts

Showing posts with the label List

Io programming language List for JavaScript

Io is a small, prototype-based programming language. The ideas in Io are mostly inspired by Smalltalk (all values are objects, all messages are dynamic), Self (prototype-based), NewtonScript (differential inheritance), Act1 (actors and futures for concurrency), LISP (code is a runtime inspectable/modifiable tree) and Lua (small, embeddable). This programming language is really interesting, starting from syntax, throw the entire guide . One of its primitive type is called List, and this is a summary of this type: A List is an array of references and supports all the standard array manipulation and enumeration methods. It seems that List is all we need when we think about an Array of elements ... so why couldn't we have something similar in JavaScript? // Io programming language List example // followed by my JavaScript List implementation a := List clone a = List.clone() a := list(33, "a") a = list(33, "a") a append("b") a.append("b") ==> ...