Programming and Meta-Programming in Scheme by Jon Pearce

By Jon Pearce

By now, Scheme is a well-established programming language and is discovering expanding acceptance in programming classes for undergraduates. Its expressive features are matched via a simplicity of language and ease-of-use that have made its adherents disciples! This textbook offers a accomplished first direction in Scheme and covers all of its significant positive aspects: abstraction, sensible programming, information varieties, recursion, and semantic programming. even if the first target of this article is to educate scholars to application in Scheme, it will likely be compatible for any scholar learning a basic programming rules direction. each one bankruptcy is split into 3 sections: middle, appendix , and difficulties. so much crucial issues are lined within the middle part, however it is believed that almost all scholars will learn the appendices and resolve lots of the difficulties. (Nearly all the difficulties require scholars to jot down brief Scheme procedures.) in addition to supplying a radical grounding in Scheme, the writer discusses intensive varied programming paradigms. an immense subject all through is that of "meta-programming": the viewpoint that courses themselves could be taken care of as information, and for that reason will be analyzed and converted as gadgets. this offers perception into subject matters akin to type-checking and overloading which would rather be missed.

Show description

Read Online or Download Programming and Meta-Programming in Scheme PDF

Best compilers books

Verilog: Frequently Asked Questions: Language, Applications and Extensions

This ebook addresses "front finish" questions and concerns encountered in utilizing the Verilog HDL, in the course of all of the levels of layout, Synthesis and Verification. the problems mentioned within the ebook are usually encountered in either ASIC layout tasks in addition to in smooth IP designs. those matters are addressed in an easy Q&A layout.

Programming Multi-Agent Systems: Third International Workshop, ProMAS 2005, Utrecht, The Netherlands, July 26, 2005, Revised and Invited Papers

The realm of self reliant brokers and multi-agent platforms (MAS) has grown right into a promising expertise supplying good choices for the layout of allotted, clever structures. a number of efforts were made via researchers and practitioners, either in academia and undefined, and by means of numerous standardisation consortia to be able to offer new languages, instruments, tools, and frameworks that allows you to determine the required criteria for a large use of MAS expertise.

Compilers: Principles, techniques, and tools

Set of rules layout introduces algorithms through the real-world difficulties that encourage them. The ebook teaches scholars a variety of layout and research concepts for difficulties that come up in computing purposes. The textual content encourages an knowing of the set of rules layout procedure and an appreciation of the function of algorithms within the broader box of desktop technology.

Rule-Based Programming

Rule-Based Programming is a wide presentation of the rule-based programming process with many instance courses displaying the strengths of the rule-based process. The rule-based procedure has been used greatly within the improvement of man-made intelligence platforms, akin to specialist structures and desktop studying.

Extra info for Programming and Meta-Programming in Scheme

Example text

2 * 16 1 + 10 * 16° + 2 * 16- 1 + 4 * 16- 2 + ... Appendices 25 Computers store, process, and communicate data as voltage levels. To avoid ambiguity only two levels are distinguished: high and low. 001001001 ... = 1 * 2 5 + 0 * 24 + 1 * 2 3 + 0 + 1 * 21 + 0 * 2° + 0 * 2- 1 + 0 * 2- 2 + 1 * 2- 3 + ... x * 22 The radix of a representation scheme is the number of allowable digits. The hexadecimal radix is 16, the octal radix is eight, the decimal radix is ten, and the binary radix is two. Representing Integers and Rationals All of the representations of x given so far are infinitely long.

1 2 3) '( 1 2 3» unspecified > (eq? 5 5) unspecified The empty list, #f, and structurally equivalent symbols are the notable exceptions. These are unique objects in all Scheme implementations: > (eq? 'cat 'CAT) ; symbols are case insensitive it > (eq? if if) it > ( eq? '() '(» it The eqv? predicate is a hybrid between eq? and equal? For simple values (numbers, Booles, chars, symbols) it tests for structural equivalence, but for composite values Oists, strings, vectors, pairs) it tests for physical equivalence.

The hexadecimal radix is 16, the octal radix is eight, the decimal radix is ten, and the binary radix is two. Representing Integers and Rationals All of the representations of x given so far are infinitely long. ) to indicate that the fraction part continues forever. Computers too have difficulty dealing with infinitely long representations. For this reason three subsets of the reals are of particular interest. If all of the digits in the fraction part are zeros, we can safely ignore them and just represent the real by its integer part.

Download PDF sample

Rated 4.87 of 5 – based on 18 votes
Posted In CategoriesCompilers