Jump to content

NewtonScript: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Citation bot (talk | contribs)
m Removed parameters. | You can use this bot yourself. Report bugs here. | User-activated.
MattNote (talk | contribs)
m Fixed typo #article-section-source-editor
Tags: Mobile edit Mobile app edit iOS app edit
 
(26 intermediate revisions by 15 users not shown)
Line 1: Line 1:
{{Short description|Prototype-based programming language for the Apple Newton platform}}
{{Infobox programming language
{{Infobox programming language
|name = NewtonScript
|name = NewtonScript
Line 9: Line 10:
|typing = [[dynamic typing|Dynamic]]
|typing = [[dynamic typing|Dynamic]]
|dialects =
|dialects =
|influenced = [[Io programming language|Io]]
|year = {{Start date and age|1993}}
|year = {{Start date and age|1993}}
|influenced_by = [[Self (programming language)|Self]], [[Dylan programming language|Dylan]]
|influenced_by = [[Self (programming language)|Self]], [[Dylan (programming language)|Dylan]]
|influenced = [[Io (programming language)|Io]]
}}
}}


'''NewtonScript''' is a [[prototype-based programming|prototype-based]] [[programming language]] created to write programs for the [[Newton (platform)|Newton]] platform.<ref>{{Cite book|last=Smith|first=W. R.|date=1994-02-01|title=The Newton application architecture|url=http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=282931|journal=Compcon Spring '94, Digest of Papers.|pages=156–161|doi=10.1109/CMPCON.1994.282931|isbn=978-0-8186-5380-3}}</ref> It is heavily influenced by the [[Self (computer language)|Self]] programming language, but modified to be more suited to needs of [[Mobile phone|mobile]] and [[Embedded system|embedded devices]].<ref name=":1">{{Cite web|url=http://www.cc.gatech.edu/~schoedl/projects/NewtonScript/ |title=The NewtonScript Programming Language |last=Schödl |first=Arno |date=2004-10-10 |website= |access-date=2016-09-15 |deadurl=bot: unknown |archiveurl=https://web.archive.org/web/20041010175535/http://www.cc.gatech.edu/~schoedl/projects/NewtonScript/ |archivedate=2004-10-10 |df= }}</ref>
'''NewtonScript''' is a [[prototype-based programming|prototype-based]] [[programming language]] created to write programs for the [[Newton (platform)|Newton]] platform.<ref>{{Cite book|last=Smith|first=W. R.|title=Proceedings of COMPCON '94 |chapter=The Newton application architecture |date=1994-02-01|journal=Compcon Spring '94, Digest of Papers.|pages=156–161|doi=10.1109/CMPCON.1994.282931|isbn=978-0-8186-5380-3|s2cid=8780685 }}</ref> It is heavily influenced by the [[Self (computer language)|Self]] programming language, but modified to be more suited to needs of [[Mobile phone|mobile]] and [[Embedded system|embedded devices]].<ref name=":1">{{Cite web|url=http://www.cc.gatech.edu/~schoedl/projects/NewtonScript/ |title=The NewtonScript Programming Language |last=Schödl |first=Arno |date=2004-10-10 |access-date=2016-09-15 |url-status=bot: unknown |archive-url=https://web.archive.org/web/20041010175535/http://www.cc.gatech.edu/~schoedl/projects/NewtonScript/ |archive-date=2004-10-10 }}</ref>


== History ==
== History ==
On August 3, 1993, Apple unveiled Apple Newton [[MessagePad]]. The device had 640 KB RAM and 4 MB ROM, running on 20 MHz Acorn RISC machine.
On August 3, 1993, Apple unveiled the Apple Newton [[MessagePad]]. The device had 640 KB RAM, 4 MB ROM, and a 20 MHz [[ARM architecture|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 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 C++ language but realized that it lacked flexibility. They started focusing on prototype based languages and were impressed with Smalltalk and Self.<ref name=":2">{{Cite book|last=Smith|first=Walter R.|date=1995-01-01|title=Using a Prototype-based Language for User Interface: The Newton Project's Experience|journal=Proceedings of the Tenth Annual Conference on Object-oriented Programming Systems, Languages, and Applications|series=OOPSLA '95|location=New York, NY, USA|publisher=ACM|pages=61–72|doi=10.1145/217838.217844|isbn=978-0897917032}}</ref> Concurrently Apple was developing another dynamic programming language called [[Dylan (programming language)|Dylan]], which was a strong candidate for Newton platform.<ref>{{Cite web|url=http://www.cise.ufl.edu/~jnw/Marlais/OODL.html|title=Dylan: An Object Oriented Dynamic Language|website=www.cise.ufl.edu|access-date=2016-09-22}}</ref>
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.<ref name=":2">{{Cite book|last=Smith|first=Walter R.|title=Proceedings of the tenth annual conference on Object-oriented programming systems, languages, and applications - OOPSLA '95 |chapter=Using a prototype-based language for user interface |date=1995-01-01|location=New York, NY, USA|publisher=ACM|pages=61–72|doi=10.1145/217838.217844|isbn=978-0897917032|s2cid=14099947 }}</ref> Concurrently Apple was developing another dynamic programming language called [[Dylan (programming language)|Dylan]], which was a strong candidate for the Newton platform.<ref>{{Cite web|url=http://www.cise.ufl.edu/~jnw/Marlais/OODL.html|title=Dylan: An Object Oriented Dynamic Language|website=www.cise.ufl.edu|access-date=2016-09-22}}</ref>


However, both Self and Dylan were dropped out of consideration, as they were both in nascent stage for proper integration.
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 as NewtonScript. it was influenced by [[Dynamic programming language|dynamic language]] like [[Smalltalk]] and prototype model based like Self.<ref name=":2" />
Instead, a team headed by Walter R. Smith developed a new language called NewtonScript. It was influenced by [[Dynamic programming language|dynamic language]] like [[Smalltalk]] and prototype model based like Self.<ref name=":2" />


== Features ==
== Features ==
Line 33: Line 34:
# One is that the typical Self snapshot requires 32 MB of [[Random-access memory|RAM]] to run in, whereas the Newton platform was designed to use only 128 KB for the operating system. This required some serious paring down of the engine to make it fit and still have room for applications.
# One is that the typical Self snapshot requires 32 MB of [[Random-access memory|RAM]] to run in, whereas the Newton platform was designed to use only 128 KB for the operating system. This required some serious paring down of the engine to make it fit and still have room for applications.
# Another issue was performance. Since the language would be used for the entire system, as opposed to just running on an existing operating system, it needed to run as fast as possible.
# Another issue was performance. Since the language would be used for the entire system, as opposed to just running on an existing operating system, it needed to run as fast as possible.
# Finally, the inheritance system in the normal Self engine had a single parent object,<ref>{{Cite book|last=Chambers|first=C.|last2=Ungar|first2=D.|last3=Lee|first3=E.|date=1989-01-01|title=An Efficient Implementation of SELF a Dynamically-typed Object-oriented Language Based on Prototypes|journal=Conference Proceedings on Object-oriented Programming Systems, Languages and Applications|series=OOPSLA '89|location=New York, NY, USA|publisher=ACM|pages=49–70|doi=10.1145/74877.74884|isbn=978-0897913331|citeseerx=10.1.1.588.6955}}</ref> whereas [[Graphical user interface|GUI]]s typically have two — one for the objects and another for the GUI layout that is typically handled via the addition of a slot in some sort of GUI-hierarchy object (like [[View model|View]]).
# Finally, the inheritance system in the normal Self engine had a single parent object,<ref>{{Cite book|last1=Chambers|first1=C.|last2=Ungar|first2=D.|last3=Lee|first3=E.|title=Conference proceedings on Object-oriented programming systems, languages and applications - OOPSLA '89 |chapter=An efficient implementation of SELF a dynamically-typed object-oriented language based on prototypes |date=1989-01-01|location=New York, NY, USA|publisher=ACM|pages=49–70|doi=10.1145/74877.74884|isbn=978-0897913331|citeseerx=10.1.1.588.6955|s2cid=5798276 }}</ref> whereas [[Graphical user interface|GUI]]s typically have two — one for the objects and another for the GUI layout that is typically handled via the addition of a slot in some sort of GUI-hierarchy object (like [[View model|View]]).
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.
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.
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.<ref name=":0">{{Cite web|url=https://manuals.info.apple.com/MANUALS/1000/MA1508/en_US/NewtonScriptProgramLanguage.PDF|title=The NewtonScript Programming Language|last=|first=|date={{date|1996}}|website=|access-date={{Date}}}}</ref>
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.<ref name=":0">{{Cite web|url=https://manuals.info.apple.com/MANUALS/1000/MA1508/en_US/NewtonScriptProgramLanguage.PDF|title=The NewtonScript Programming Language|date=1996|archiveurl=https://web.archive.org/web/20150124193723/https://manuals.info.apple.com/MANUALS/1000/MA1508/en_US/NewtonScriptProgramLanguage.PDF|archivedate=2015-01-24}}</ref>


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 memory|flash RAM]] by storing the bulk of the default data and code in the PDA's cheaper and much larger [[Read-only memory|ROM]].
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 memory|flash RAM]] by storing the bulk of the default data and code in the PDA's cheaper and much larger [[Read-only memory|ROM]].
Line 49: Line 50:
'''Protos:''' They can be blueprint for a template or a view, and are elements of NewtonScript code libraries.
'''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 fram 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.<ref>{{Cite book|title=Programming for the Newton®: Software Development with NewtonscriptTM|last=McKeehan|first=Julie|last2=Rhodes|first2=Neil|publisher=AP Professional|year=1994|isbn=978-0-12-484800-9|location=955 Massachusetts Avenue, Cambridge, Massachusetts 02139|pages=|via=}}</ref>
'''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.<ref>{{Cite book|title=Programming for the Newton®: Software Development with NewtonscriptTM|last1=McKeehan|first1=Julie|last2=Rhodes|first2=Neil|publisher=AP Professional|year=1994|isbn=978-0-12-484800-9|location=955 Massachusetts Avenue, Cambridge, Massachusetts 02139}}</ref>


'''Soup and Entry:''' It is a related collection of frames/ data. Entry is an individual frame in a soup.
'''Soup and Entry:''' It is a related collection of frames/ data. Entry is an individual frame in a soup.
Line 57: Line 58:
'''Base View:''' It is the main view of application, consisting of all the variables and [[Method (computer programming)|methods]] used in the application.
'''Base View:''' It is the main view of application, consisting of all the variables and [[Method (computer programming)|methods]] used in the application.


== Advantages and Disadvantages ==
== Advantages and disadvantages ==
'''Advantages'''
;Advantages
* NewtonScript is a dynamic prototype based programming language, which uses differential inheritance. This means that it is very effective is using memory space. Being dynamic, it is easy to modify objects, type checking, etc. at run time, giving great flexibility for developers.
* NewtonScript is a dynamic prototype based programming language, which uses differential inheritance. This means that it is very effective in using memory space. Being dynamic, it is easy to modify objects, type checking, etc. at run time, giving great flexibility for developers.
* Objects created can be stored in permanent memory like flash card or internal memory. The RAM is used only for storing attributes whose values change during runtime. This reduces memory consumption.
* Objects created can be stored in permanent memory like flash card or internal memory. The RAM is used only for storing attributes whose values change during runtime. This reduces memory consumption.
* Writing interfaces for GUI applications can be implemented effectively using the prototype model, since we can directly write an object for a GUI control rather than creating a class and instantiating it.
* Writing interfaces for GUI applications can be implemented effectively using the prototype model, since we can directly write an object for a GUI control rather than creating a class and instantiating it.
* Garbage collection is carried automatically by the system. This helped the developers to focus more on application development rather than worrying about memory management. [[Garbage collection (computer science)|Garbage collection]] also helped in mitigating problem of [[dangling pointer]]s where a pointer erroneously points to a memory location that was deallocated.<ref name=":0"/>
* [[Garbage collection (computer science)|Garbage collection]] is carried automatically by the system. This helped the developers to focus more on application development rather than worrying about memory management. Garbage collection also helped in mitigating problem of [[dangling pointer]]s where a pointer erroneously points to a memory location that was deallocated.<ref name=":0"/>

'''Disadvantages'''
;Disadvantages
* Since NewtonScript code was written on one platform and run on another, it was practically impossible to debug.<ref name=":1"/> Better debugging code in the Newton engine would have helped offset this problem to some degree, but the limited memory made this difficult. Instead the developer would get a vague indication along with an error code, without any ability to match it to lines in the original code.
* Since NewtonScript code was written on one platform and run on another, it was practically impossible to debug.<ref name=":1"/> Better debugging code in the Newton engine would have helped offset this problem to some degree, but the limited memory made this difficult. Instead the developer would get a vague indication along with an error code, without any ability to match it to lines in the original code.
* Another disadvantage is that, dynamic variable reduces the speed of operation since simple pointer dereference cannot be used as in statically typed like C++ and Java.
* Another disadvantage is that, dynamic variable reduces the speed of operation since simple pointer dereference cannot be used as in statically typed like C++ and Java.


== Influences ==
== Influences ==
With the cancellation of Newton project by Apple in 1998,<ref>{{Cite web|url=http://windowsitpro.com/windows-server/apple-cancels-newton|title=Apple cancels Newton|website=windowsitpro.com|access-date=2016-09-22|date=1998-02-28}}</ref> all further mainstream developments on NewtonScript were stopped. However, the features used in NewtonScript would continue to inspire other programming models and languages.
With the cancellation of the Newton project by Apple in 1998,<ref>{{Cite web|url=http://windowsitpro.com/windows-server/apple-cancels-newton|title=Apple cancels Newton|website=windowsitpro.com|access-date=2016-09-22|date=1998-02-28}}</ref> 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.
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.
Line 76: Line 78:
== See also ==
== See also ==
* [[Prototype-based programming]]
* [[Prototype-based programming]]
* [[Dynamic programming language|Dynamic Languages]]
* [[Dynamic programming language]]
* [[JavaScript|Javascript]]
* [[JavaScript]]


==References==
== References ==
{{Reflist}}
{{Reflist}}


== External links ==
== External links ==
* [http://waltersmith.us/wp-content/uploads/2005/12/Self-intro.htm SELF and the Origins of NewtonScript], by Walter Smith, 1994.
* [http://waltersmith.us/wp-content/uploads/2005/12/Self-intro.htm SELF and the Origins of NewtonScript] {{Webarchive|url=https://web.archive.org/web/20100311070259/http://waltersmith.us/wp-content/uploads/2005/12/Self-intro.htm |date=2010-03-11 }}, by Walter Smith, 1994.
* [http://waltersmith.us/wp-content/uploads/2005/12/OOPSLA95.pdf Using a Prototype-based Language for User Interface: The Newton Project’s Experience] (PDF), by Walter Smith, 1995.
* [http://waltersmith.us/wp-content/uploads/2005/12/OOPSLA95.pdf Using a Prototype-based Language for User Interface: The Newton Project’s Experience] {{Webarchive|url=https://web.archive.org/web/20080903111832/http://waltersmith.us/wp-content/uploads/2005/12/OOPSLA95.pdf |date=2008-09-03 }} (PDF), by Walter Smith, 1995.
* [http://waltersmith.us/wp-content/uploads/2005/12/class-based-NS.htm Class-based NewtonScript Programming] by Walter Smith, 1993.
* [http://waltersmith.us/wp-content/uploads/2005/12/class-based-NS.htm Class-based NewtonScript Programming] {{Webarchive|url=https://web.archive.org/web/20080629080949/http://waltersmith.us/wp-content/uploads/2005/12/class-based-NS.htm |date=2008-06-29 }} by Walter Smith, 1993.
* [http://www.waltersmith.us/newton/ Additional Newton-related papers] by Walter Smith.
* [http://www.waltersmith.us/newton/ Additional Newton-related papers] {{Webarchive|url=https://web.archive.org/web/20200117132817/http://waltersmith.us/newton |date=2020-01-17 }} by Walter Smith.
* [https://web.archive.org/web/20041010175535/http://www.cc.gatech.edu/~schoedl/projects/NewtonScript/ The NewtonScript Programming Language] (archive.org cache; original link dead as of 10/15/04.)
* [https://web.archive.org/web/20041010175535/http://www.cc.gatech.edu/~schoedl/projects/NewtonScript/ The NewtonScript Programming Language] (archive.org cache; original link dead as of 10/15/04.)
* [http://trac.so-kukan.com/newt/ NEWT/0] A portable NewtonScript compiler/interpreter
* [http://trac.so-kukan.com/newt/ NEWT/0] A portable NewtonScript compiler/interpreter
* [http://communicrossings.com/html/newton/newtdev.htm NewtDevEnv], a NewtonScript development environment that enables development to be carried out directly on the Newton by Steve Weyer.
* [http://communicrossings.com/html/newton/newtdev.htm NewtDevEnv], a NewtonScript development environment that enables development to be carried out directly on the Newton by Steve Weyer.
* [http://code.google.com/p/dynee5/ DyneTK], a NewtonScript development environment that replaces the original Newton ToolKit (NTK); works on MS Windows and Mac OS X by Matthias Melcher.
* [https://github.com/matthiaswm/dynee5 DyneTK], a NewtonScript development environment that replaces the original Newton ToolKit (NTK); works on MS Windows and Mac OS X by Matthias Melcher.


[[Category:Apple Newton]]
[[Category:Apple Newton]]

Latest revision as of 03:55, 12 April 2024

NewtonScript
ParadigmPrototype Object-oriented
Designed byWalter Smith
DeveloperApple Computer
First appeared1993; 31 years ago (1993)
Typing disciplineDynamic
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]

History

[edit]

On August 3, 1993, Apple unveiled the Apple Newton MessagePad. The device had 640 KB RAM, 4 MB ROM, and a 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]

Eigenschaften

[edit]

Although NewtonScript was heavily influenced by Self, there were some differences in both the languages.

Differences arose due to three perceived problems with Self.

  1. One is that the typical Self snapshot requires 32 MB of RAM to run in, whereas the Newton platform was designed to use only 128 KB for the operating system. This required some serious paring down of the engine to make it fit and still have room for applications.
  2. Another issue was performance. Since the language would be used for the entire system, as opposed to just running on an existing operating system, it needed to run as fast as possible.
  3. Finally, the inheritance system in the normal Self engine had a single parent object,[5] whereas GUIs typically have two — one for the objects and another for the GUI layout that is typically handled via the addition of a slot in some sort of GUI-hierarchy object (like View).

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.

Important terms

[edit]

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.

Advantages and disadvantages

[edit]
Advantages
  • NewtonScript is a dynamic prototype based programming language, which uses differential inheritance. This means that it is very effective in using memory space. Being dynamic, it is easy to modify objects, type checking, etc. at run time, giving great flexibility for developers.
  • Objects created can be stored in permanent memory like flash card or internal memory. The RAM is used only for storing attributes whose values change during runtime. This reduces memory consumption.
  • Writing interfaces for GUI applications can be implemented effectively using the prototype model, since we can directly write an object for a GUI control rather than creating a class and instantiating it.
  • Garbage collection is carried automatically by the system. This helped the developers to focus more on application development rather than worrying about memory management. Garbage collection also helped in mitigating problem of dangling pointers where a pointer erroneously points to a memory location that was deallocated.[6]
Disadvantages
  • Since NewtonScript code was written on one platform and run on another, it was practically impossible to debug.[2] Better debugging code in the Newton engine would have helped offset this problem to some degree, but the limited memory made this difficult. Instead the developer would get a vague indication along with an error code, without any ability to match it to lines in the original code.
  • Another disadvantage is that, dynamic variable reduces the speed of operation since simple pointer dereference cannot be used as in statically typed like C++ and Java.

Influences

[edit]

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.

See also

[edit]

References

[edit]
  1. ^ Smith, W. R. (1994-02-01). "The Newton application architecture". Proceedings of COMPCON '94. pp. 156–161. doi:10.1109/CMPCON.1994.282931. ISBN 978-0-8186-5380-3. S2CID 8780685. {{cite book}}: |journal= ignored (help)
  2. ^ a b Schödl, Arno (2004-10-10). "The NewtonScript Programming Language". Archived from the original on 2004-10-10. Retrieved 2016-09-15.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  3. ^ a b Smith, Walter R. (1995-01-01). "Using a prototype-based language for user interface". Proceedings of the tenth annual conference on Object-oriented programming systems, languages, and applications - OOPSLA '95. New York, NY, USA: ACM. pp. 61–72. doi:10.1145/217838.217844. ISBN 978-0897917032. S2CID 14099947.
  4. ^ "Dylan: An Object Oriented Dynamic Language". www.cise.ufl.edu. Retrieved 2016-09-22.
  5. ^ Chambers, C.; Ungar, D.; Lee, E. (1989-01-01). "An efficient implementation of SELF a dynamically-typed object-oriented language based on prototypes". Conference proceedings on Object-oriented programming systems, languages and applications - OOPSLA '89. New York, NY, USA: ACM. pp. 49–70. CiteSeerX 10.1.1.588.6955. doi:10.1145/74877.74884. ISBN 978-0897913331. S2CID 5798276.
  6. ^ a b "The NewtonScript Programming Language" (PDF). 1996. Archived from the original (PDF) on 2015-01-24.
  7. ^ McKeehan, Julie; Rhodes, Neil (1994). Programming for the Newton®: Software Development with NewtonscriptTM. 955 Massachusetts Avenue, Cambridge, Massachusetts 02139: AP Professional. ISBN 978-0-12-484800-9.{{cite book}}: CS1 maint: location (link)
  8. ^ "Apple cancels Newton". windowsitpro.com. 1998-02-28. Retrieved 2016-09-22.
  9. ^ "io guide". iolanguage.org. Retrieved 2016-09-15.
[edit]