Talk:Scheme (programming language): Difference between revisions

Content deleted Content added
Ideogram (talk | contribs)
Line 197:
 
::Schme has a number tower (terminology?) by which most arithmetic operations between numbers of different machine representations are inferred. [[User:Ideogram|Ideogram]] 22:35, 30 May 2006 (UTC)
 
:::As I understand contemporary terminology, a programming is called strongly typed if type errors cannot go unnoticed. A programming language is called dynamically typed if type errors are (mostly) detected at run time, and statically typed if type errors are (mostly) detected at compile time. Using these definitions Scheme (and [[Common Lisp]], and [[Smalltalk]], and [[Python]] etc.) are certainly strongly typed.
 
:::However, as I said, the terminology is not used consistently within the literature. Even the Scheme standard document [http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-4.html R5RS] says: ''"Scheme has latent as opposed to manifest types. Types are associated with values (also called objects) rather than with variables. (Some authors refer to languages with latent types as weakly typed or dynamically typed languages.) Other languages with latent types are APL, Snobol, and other dialects of Lisp. Languages with manifest types (sometimes referred to as strongly typed or statically typed languages) include Algol 60, Pascal, and C."''
 
:::Even more confusing is that some authors apparantly restrict the term "type error" to mean type errors that are detected at compile time.
 
::: The paper [http://citeseer.ist.psu.edu/cardelli85understanding.html On Understanding Types, Data Abstraction, and Polymorphism] by [[Luca Cardelli]] and [[Peter Wegner]] says: ''"Programming languages in which the type of every expression can be determined by static program analysis are said to be statically typed. Static typing is a useful property, but the requirement that all variables and expressions are bound to a type at compile time is sometimes too restrictive. It may be replaced by the weaker requirement that all expressions are guaranteed to be type-consistent although the type itself may be statically unknown; this can be generally done by introducing some run-time type checking. Languages in which all expressions are type-consistent are called strongly typed languages. If a language is strongly typed its compiler can guarantee that the programs it accepts will execute without type errors. In general, we should strive for strong typing, and adopt static typing whenever possible. Note that every statically typed language is strongly typed but the converse is not necessarily true."'' This view is at least consistent with that expressed on [[type system]]. — [[User:Tobias Bergemann|Tobias Bergemann]] 07:40, 31 May 2006 (UTC)