Paradigm | Prototype Object-oriented |
---|---|
Designed by | Walter Smith |
Developer | Apple Computer |
First appeared | 1993 |
Typing discipline | Dynamic |
Influenced by | |
Self, Dylan | |
Influenced | |
Io |
NewtonScript is a prototype-based programming language created to write programs for the Newton platform. [1] It is heavily influenced by the Self programming language, but modified to be more suited to needs of mobile and embedded devices. [2]
On August 3, 1993, Apple unveiled the Apple Newton MessagePad. The device had 640 KB RAM, 4 MB ROM, and an 20 MHz ARM 610 microprocessor.
The main intention behind Newton project, was to develop a device capable of replacing a computer while being portable. With limited battery and memory, the developers were looking for programming language capable of meeting these challenges.
The developers looked at the C++ programming language but realized that it lacked flexibility. They started focusing on prototype based languages and were impressed with Smalltalk and Self. [3] Concurrently Apple was developing another dynamic programming language called Dylan, which was a strong candidate for the Newton platform. [4]
However, both Self and Dylan were dropped out of consideration, as they were both in nascent stage for proper integration.
Instead, a team headed by Walter R. Smith developed a new language called NewtonScript. It was influenced by dynamic language like Smalltalk and prototype model based like Self. [3]
Although NewtonScript was heavily influenced by Self, there were some differences in both the languages.
Differences arose due to three perceived problems with Self.
The syntax was also modified to allow a more text-based programming style, as opposed to Self's widespread use of a GUI environment for programming. This allowed Newton programs to be developed on a computer running the Toolkit, where the programs would be compiled and then downloaded to a Newton device for running.
One of the advantages of NewtonScript's prototype based inheritance was reduced memory usage, a key consideration in the 128 KB Newton. The prototype of a GUI object could actually be stored in ROM, so there was no need to copy default data or functions into working memory.
Unlike class-based languages, where creation of an object involves memory being allocated to all of its attributes, NewtonScripts' use of prototype inheritance allowed it to allocated memory to few fields like _proto and _parent instead of creating whole new object. Here, _proto and _parent signifies whether the object is using prototype or parent inheritance. [6]
An example to illustrate above concept, a developer might create a new button instance. If the button uses the default font, accessing its font "slot" (i.e., property or member variable) will return a value that is actually stored in ROM; the button instance in RAM does not have a value in its own font slot, so the prototype inheritance chain is followed until a value is found. If the developer then changes the button's font, setting its font slot to a new value will override the prototype; this override value is stored in RAM. NewtonScript's "differential inheritance" therefore made efficient use of the Newton's expensive flash RAM by storing the bulk of the default data and code in the PDA's cheaper and much larger ROM.
Views: They are objects created by Newton View System, which are created on run-time to render views.
Template: It is a blueprint from which views are created.
Protos: They can be blueprint for a template or a view, and are elements of NewtonScript code libraries.
Frame and Slot: Frame is a dynamic collection of slots, and one element of frame is called as a slot. A slot is made up of name and value. The value can be of any type. It is worthwhile to note that all objects in NewtonScript are frames. [7]
Soup and Entry: It is a related collection of frames/ data. Entry is an individual frame in a soup.
Frame Heap: RAM allocated dynamically by NewtonScript.
Base View: It is the main view of application, consisting of all the variables and methods used in the application.
With the cancellation of the Newton project by Apple in 1998, [8] all further mainstream developments on NewtonScript were stopped. However, the features used in NewtonScript would continue to inspire other programming models and languages.
The prototype-based object model of Self and NewtonScript was used in JavaScript, the most popular and visible language to use the concept so far.
NewtonScript is also one of the conceptual ancestors (together with Smalltalk, Self, Act1, Lisp and Lua) of a general-purpose programming language called Io [9] which implements the same differential inheritance model, which was used in NewtonScript to conserve memory.
Dylan is a multi-paradigm programming language that includes support for functional and object-oriented programming (OOP), and is dynamic and reflective while providing a programming model designed to support generating efficient machine code, including fine-grained control over dynamic and static behaviors. It was created in the early 1990s by a group led by Apple Computer.
HyperCard is a software application and development kit for Apple Macintosh and Apple IIGS computers. It is among the first successful hypermedia systems predating the World Wide Web.
Smalltalk is a purely object oriented programming language (OOP) that was originally created in the 1970s for educational use, specifically for constructionist learning, but later found use in business. It was created at Xerox PARC by Learning Research Group (LRG) scientists, including Alan Kay, Dan Ingalls, Adele Goldberg, Ted Kaehler, Diana Merry, and Scott Wallace.
Cocoa is Apple's native object-oriented application programming interface (API) for its desktop operating system macOS.
Self is an object-oriented programming language based on the concept of prototypes. Self began as a dialect of Smalltalk, being dynamically typed and using just-in-time compilation (JIT) as well as the prototype-based approach to objects: it was first used as an experimental test system for language design in the 1980s and 1990s. In 2006, Self was still being developed as part of the Klein project, which was a Self virtual machine written fully in Self. The latest version is 2017.1 released in May 2017.
Prototype-based programming is a style of object-oriented programming in which behaviour reuse is performed via a process of reusing existing objects that serve as prototypes. This model can also be known as prototypal, prototype-oriented,classless, or instance-based programming.
In computer science, a dynamic programming language is a class of high-level programming languages, which at runtime execute many common programming behaviours that static programming languages perform during compilation. These behaviors could include an extension of the program, by adding new code, by extending objects and definitions, or by modifying the type system. Although similar behaviors can be emulated in nearly any language, with varying degrees of difficulty, complexity and performance costs, dynamic languages provide direct tools to make use of them. Many of these features were first implemented as native features in the Lisp programming language.
Io is a pure object-oriented programming language inspired by Smalltalk, Self, Lua, Lisp, Act1, and NewtonScript. Io has a prototype-based object model similar to the ones in Self and NewtonScript, eliminating the distinction between instance and class. Like Smalltalk, everything is an object and it uses dynamic typing. Like Lisp, programs are just data trees. Io uses actors for concurrency.
ActionScript is an object-oriented programming language originally developed by Macromedia Inc.. It is influenced by HyperTalk, the scripting language for HyperCard. It is now an implementation of ECMAScript, though it originally arose as a sibling, both being influenced by HyperTalk. ActionScript code is usually converted to byte-code format by a compiler.
In object-oriented programming, delegation refers to evaluating a member of one object in the context of another original object. Delegation can be done explicitly, by passing the sending object to the receiving object, which can be done in any object-oriented language; or implicitly, by the member lookup rules of the language, which requires language support for the feature. Implicit delegation is the fundamental method for behavior reuse in prototype-based programming, corresponding to inheritance in class-based programming. The best-known languages that support delegation at the language level are Self, which incorporates the notion of delegation through its notion of mutable parent slots that are used upon method lookup on self calls, and JavaScript; see JavaScript delegation.
F-Script is an object-oriented scripting programming language for Apple's macOS operating system developed by Philippe Mougin. F-Script is an interactive language based on Smalltalk, using macOS's native Cocoa API.
Kaleida Labs formed in 1991 to produce the multimedia cross-platform Kaleida Media Player and the object oriented scripting language ScriptX that was used to program its behavior. The system was aimed at the production of interactive CD ROM titles, an area of major effort in the early 1990s. When the system was delivered in 1994, it had relatively high system requirements and memory footprint, and lacked a native PowerPC version on the Mac platform. Around the same time, rapid changes in the market, especially the expansion of the World Wide Web and the Java programming language, pushed the interactive CD market into a niche role. The Kaleida platform failed to gain significant traction and the company was closed in 1996.
The term object-based language may be used in a technical sense to describe any programming language that uses the idea of encapsulating state and operations inside objects. Object-based languages need not support inheritance or subtyping, but those that do are also termed object-oriented. Object-based languages that do not support inheritance or subtyping are usually not considered to be true object-oriented languages.
Dylan programming language history first introduces the history with a continuous text. The second section gives a timeline overview of the history and present several milestones and watersheds. The third section presents quotations related to the history of the Dylan programming language.
Apple Dylan is the original implementation of the programming language Dylan. It was developed by Apple Computer from 1992 to 1995.
Newspeak is a programming language and platform in the tradition of Smalltalk and Self being developed by a team led by Gilad Bracha. The platform includes an integrated development environment (IDE), a graphical user interface (GUI) library, and standard libraries. Starting in 2006, Cadence Design Systems funded its development and employed the main contributors, but ended funding in January 2009.
Embedded Wizard is a graphical user interface tool developed and distributed by TARA Systems GmbH for creating graphical user interface (GUI) applications mainly for embedded systems. It provides a WYSIWYG front-end for editing graphics, effects and logic of the user interface and generates ANSI C code for particular target hardware. Embedded Wizard is independent of a specific graphics hardware or color format and supports object oriented programming.
Object-oriented programming (OOP) is a programming paradigm based on the concept of objects, which can contain data and code: data in the form of fields, and code in the form of procedures.
Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was selected by NeXT for its NeXTSTEP operating system. Due to Apple macOS’s direct lineage from NeXTSTEP, Objective-C was the standard programming language used, supported, and promoted by Apple for developing macOS and iOS applications until the introduction of the Swift programming language in 2014. Thereafter, its usage has been consistently declining among developers and it has often been described as a "dying" language.
{{cite book}}
: |journal=
ignored (help){{cite web}}
: CS1 maint: bot: original URL status unknown (link){{cite book}}
: CS1 maint: location (link)