下载  >  开发技术  >  其它  > The Scheme Programming Language

The Scheme Programming Language 评分:

推荐使用ChezScheme 学习scheme,可以在sublime_text中配置当脚本运行,很快。
CHAPTER 1. INTRODUCTION CHAPTER 4, PROCEDURES AND VARIABLE BINDINGS CHAPTER 5. CONTROL OPERATIONS CHAPTER 6. OPERATIONS ON OBJECTS CHAPTER 7. INPUT AND OUTPUT ChAPTER 8. SYNTACTIC EXTENSION chAPTER 9. RECORDS CHAPTER 9. RECORDS CHAPTER 11. EXCEPTIONS AND CONDITIONS REFERENCES FORMAL SYNTAX SUMMARY OF FORMS Chapter 1. Introduction Scheme is a general-purpose computer programming language. It is a high-level language, supporting operations on structured data such as strings, lists, and vectors, as well as operations on more traditional data such as numbers and characters. While scheme is often identified with symbolic applications, its rich set of data types and flexible control structures make it a truly versatile language. Scheme has been employed to write text editors, optimizing compilers, operating systems, graphics packages, expert systens, numerical applications, financial analysis packages, virtual reality systems, and practically every other type of application imaginable. Scheme is a fairly simple language to learn, since it is based on a handful of syntactic forms and semantic concepts and since the interactive nature of most implementations encourages experimentation. Scheme is a challenging language to understand full however, developing the ability to use its full potential requires careful study and practice Scheme programs are highly portable across versions of the same Schenme implementation on different machines, because machine dependencies are almost completely hidden from the programmer. They are also portable across different implementations because the efforts of a group of Scheme language designers who have published a series of reports, the Revised Reports- onl Scl Re ne. The most recent, the Revised Report[241 emphasizes portability through a set of standard libraries and a standard mechanism for defining new portable libraries and top - level programs Although some early Scheme systems were inefficient and slow, lany newer compiler-based implementations are fast, with programs running on par with equivalent programs written in lower-level languages. The relative inefficiency that somet imes remains results from run-time checks that support generic arithmetic and help programmers detect and correct various common programming errors. These checks may be disabled in many implementations Scheme supports many types of data values, or objects, including characters, strings, symbols, lists or vectors of objects, and a full set of numeric data types, including complex, real, and arbitrary-precision rational numbers The storage required to hold the contents of anl ob ject is dynamicall allocated as necessary and retained until no longer needed, then automatically deallocated, typically by a garbage collector that periodically recovers the storage used by inaccessible objects. Simple atomic values, such as small integers, characters, booleans, and the empty list, are typically represented as immediate values and thus incur no allocation or deallocation overhead Regardless of representation, all objects are first-class data values because they are retained indefinitely, they lllay be passed freely as arguments to procedures, returned as values from procedures, and combined to form new objects. This is in contrast with many other languages where composite data values such as arrays are either statically allocated and never deallocated, allocated on entry to a block of code and unconditionally deallocated on exit from the block, or explicitly allocated and deal located by the programmer Scheme is a call-by-value language, but for at least mutable objects (objects that can be modified), the values are pointers to the actual storage. These pointers remain behind the scenes, however, and programmers need not be conscious of them except to understand that the storage for an ob ject is not copied when an object is passed to or returned from a procedure At the heart of the scheme language is a small core of syntactic forms from which all other forms are built. These core forms, a set of extended syntactic forms derived from them, and a set of primitive procedures make up the full Scheme language. An interpreter or compiler for Scheme can be quite small and potentially fast and highly reliable. The extended syntactic forms and many primitive procedures can be defined in Scheme itself, simplifying the implementation and increasing reliability. Scheme programs share a comnon printed representation with Scheme data structures. As a result, any Scheme program has a natural and obvious internal representation as a Scheme object. For example, variables and syntactic keywords correspond to symbols, while structured syntactic forms correspond to lists. This representation is the basis for the syntactic extension facilities provided by Scheme for the definition of new syntactic forms in terms of existing syntactic forms and procedures It also facilitates the implementation of interpreters, compilers, and other program transformation tools for Scheme directly in Scheme, as well as program transformation tools for other languages in Scheme Scheme variables and keywords are lexically scoped, and scheme programs are block-structured. Identifiers may be imported into a program or library or bound locally within a given block of code such as a library program, or procedure body. A local binding is visible only lexically i.e., within the program text that makes up the particular block of code An occurrence of an identifier of the same name outside this block refers to a different binding; if no binding for the identifier exists outside the block, then the reference is invalid. blocks may be nested, and a binding in one block may shadow a binding for an identifier of the same name in a surrounding block. The scope of a binding is the block in which the bound identifier is visible minus any portions of the block in which the identifier is shadowed. Block structure and lexical scoping hel create programs that are modular, easy to read, easy to maintain, and reliable. Efficient code for lexical scoping is possible because a compiler can determine before program evaluation the scope of all bindings and the binding to which each identifier reference resolves. This does not mean, of course, that a compiler can determine the values of all variables, since the actual values are not computed in most cases until the program executes. In most languages, a procedure definition is simply the association of a name with a block of code. Certain variables local to the block are the parameters of the procedure. In some languages, a procedure definition may appear within another block or procedure so long as the procedure is invoked only during execution of the enclosing block. In others procedures can be defined only at top level. In Scheme, a procedure definition may appear within another block or procedure, and the procedure may be invoked at any time thereafter, even if the enclosing block has completed its execution. To support lexical scoping, a procedure carries the lexical context (environment) along with its code. Furthermore, Scheme procedures are not always named. Instead, procedures are first-class data objects like strings or numbers, and variables are bound to procedures in the same way they are bound to other ob jects As with procedures in most other languages, Scheme procedures may be recursive. That is, any procedure may invoke itself directly or indirectly. Many algorithms are most elegantly or efficient ly specified recursively A special case of recursion, called tail recursion, is used to express iteration, or looping. a tail call occurs when one procedure directly returns the result of invoking another procedure; tail recursion occurs when a procedure recursively tail-calls itself, directly or indirectly. Scheme implementations are required to implement tail calls as jumps (gotos), so the storage overhead normally associated with recursion is avoided. As a result, Scheme programmers need master only simple procedure calls and recursion and need not be burdened with the usual assortment of looping constructs. Scheme supports the definition of arbitrary control structures with continuations. A continuation is a procedure that embodies the remainder of a program at a given point in the program. a continuation may be obtained at any time during the execution of a program. As with other procedures, a continuation is a first-class ob ject and may be invoked at any time afler its creation. Whenever it is invoked, the program immediately continues from the point where the continuation was obtained. Continuations allow the implementation of complex control mechanisms including explicit backtracking, multithreading, and coroutines. Scheme also allows programmers to define new syntactic forms, or syntactic extensions, by writing transformation procedures that determine how each new syntactic form maps to existing syntactic forms. These transformation procedures are themselves expressed in Scheme with the help of a convenient high-level pattern language that automates syntax checking input deconstruction, and output reconstruction. by default, lexical scoping is maintained through the transformation process, but the programmer can exercise control over the scope of all identifiers appearing in the output of a transformer. Syntactic extensions are useful for defining new language constructs, for emulating language constructs found in other languages, for achieving the effects of in-line code expansion, and even for emulating entire languages in Schemne. Most large Scheme programs are built from a mix of syntactic extensions and procedure definitions Scheme evolved from the Lisp language and is considered to be a dialect of Lisp. Scheme inherited from Lisp the treatment of values as first-class objects, several important data types, including symbols and lists, and the representation of programs as ob jects, among other things. Lexical scoping and block structure are features taken from Algol 60 [21] Scheme was the first lisp dialect to adopt lexical scoping and block structure first-class procedures, the treatment of tail calls as jumps continuations, and lexically scoped syntactic extensions. Common lisp [27] and Scheme are both contemporary lisp languages, and the development of each has been influenced by the other. Like Scheme but unlike earlier Lisp languages, Common Lisp adopted lexical scoping and first-class procedures, although the Common Lisp' s syntactic extension facility does not respect lexical scoping. Common Lisp s evaluation rules for procedures are different from the evaluation rules for other object however, and it maintains a separate name space for procedure variables thereby inhibiting the use of procedures as first-class objects. Also, Common lisp does not support continuations or require proper treatment of tail calls, but it does support several less general control structures not found in Scheme. While the two languages are similar, Common lisp includes more specialized constructs, while Scheme includes more general-purpose building blocks out of which such constructs(and others) may be built The remainder of this chapter describes schemes syntax and naming conventions and the typographical convent ions used throughout this book Section 1. 1. Scheme Syntax Scheme programs are made up of keywords, variables, structured forms constant data (numbers, characters, strings, quoted vectors, quoted lists quoted symbols, etc.), whitespace, and comments Keywords, variables, and symbols are collectively called identifier Identifiers may be formed from letters, digits, and cer Lain special characters, including and ( as well as a set of additional Unicode characters, identifiers cannot start with an at sign (@)and normally cannot start with any character that can start a number, i.e., a digit, plus sign (+),minus sign (-) or decimal point (. ) Exceptions are + -,anc Wh⊥C h are valid identifiers, and any identifier starting with -> For example hi, Hello, n, X, x3, X+2, and &*!! are all identifiers. Identifiers are delimited by whitespace, comments, parentheses, brackets, string (double) quotes (") and hash marks(#). a delimiter or any other

...展开详情
2018-04-23 上传 大小:4.35MB
举报 收藏
分享
The Scheme of programming language.pdf(高清晰第四版)

The Scheme Programming Language.pdf 高清晰版本。 作者:R. Kent Dybvig word版:http://yunpan.cn/cH959TYwi4Q7P 访问密码 f6fb(可以自己编辑改动)

立即下载
The Scheme Programming Language, 4th Edition

Scheme is a general-purpose programming language, descended from Algol and Lisp, widely used in computing education and research and a broad range of industrial applications. This thoroughly updated edition of The Scheme Programming Language provides an introduction to Scheme and a definitive refere

立即下载
The scheme programming language 4th

文字版pdf The scheme programming language 4th

立即下载
The Scheme Programming Language

Scheme is a general-purpose programming language, descended from Algol and Lisp, widely used in computing education and research and a broad range of industrial applications. This thoroughly updated edition of The Scheme Programming Language provides an introduction to Scheme and a definitive refere

立即下载
The scheme programming language, 4th edition

The scheme programming language, 4th edition 英文版的 从网页上提取下来 pdf格式 里面的章节链接可用

立即下载
Dybvig. The Scheme Programming Language

This thoroughly updated edition of The Scheme Programming Language provides an introduction to Scheme and a definitive reference for standard Scheme, presented in a clear and concise manner. Written for professionals and students with some prior programming experience, it begins by leading the progr

立即下载
TheSchemeProgrammingLanguage4thEdition

scheme 入门。The Scheme Programming Language 4th Edition

立即下载
The_Scheme_Programming_Language_4th_Edition

schemer经典教材,非常经典

立即下载
Scheme Programming Language, 4th Edition, The - R. Kent Dybvig.mobi

先用 wget -r -k -np -nH http://scheme.com/tspl4/ 下载,再打包成zip文件,然后用calibre转换就得到了电子书格式,pdf格式的字体太小了。azw3格式也得到了。

立即下载
html+css+js制作的一个动态的新年贺卡

该代码是http://blog.csdn.net/qq_29656961/article/details/78155792博客里面的代码,代码里面有要用到的图片资源和音乐资源。

立即下载
Camtasia 9安装及破解方法绝对有效

附件中注册方法亲测有效,加以整理与大家共享。 由于附件大于60m传不上去,另附Camtasia 9百度云下载地址。免费自取 链接:http://pan.baidu.com/s/1kVABnhH 密码:xees

立即下载
电磁场与电磁波第四版谢处方 PDF

电磁场与电磁波第四版谢处方 (清晰版),做天线设计的可以作为参考。

立即下载
压缩包爆破解密工具(7z、rar、zip)

压缩包内包含三个工具,分别可以用来爆破解密7z压缩包、rar压缩包和zip压缩包。

立即下载
算法第四版 高清完整中文版PDF

《算法 第4版 》是Sedgewick之巨著 与高德纳TAOCP一脉相承 是算法领域经典的参考书 涵盖所有程序员必须掌握的50种算法 全面介绍了关于算法和数据结构的必备知识 并特别针对排序 搜索 图处理和字符串处理进行了论述 第4版具体给出了每位程序员应知应会的50个算法 提供了实际代码 而且这些Java代码实现采用了模块化的编程风格 读者可以方便地加以改造

立即下载
jdk1.8下载

jdk1.8下载

立即下载
身份证号对应籍贯表大全(共6456条)

身份证号对应籍贯表大全(共6456条),可以很方便查出身份证对应的籍贯,方便工作、项目使用

立即下载
DirectX修复工具V3.7在线修复版

DirectX修复工具(DirectX Repair)是一款系统级工具软件,简便易用。本程序为绿色版,无需安装,可直接运行。 本程序的主要功能是检测当前系统的DirectX状态,如果发现异常则进行修复。程序主要针对0xc000007b问题设计,可以完美修复该问题。本程序中包含了最新版的DirectX redist(Jun2010),并且全部DX文件都有Microsoft的数字签名,安全放心。 本程序为了应对一般电脑用户的使用,采用了傻瓜式一键设计,只要点击主界面上的“检测并修复”按钮,程序就会自动完成校验、检测、下载、修复以及注册的全部功能,无需用户的介入,大大降低了使用难

立即下载