Stanza by Example
Patrick S. Li
Stanza by Example is an introductory book for teaching readers how to program in the L.B. Stanza programming language. Readers are assumed to have basic programming experience, at about the level required to implement and understand a basic sorting algorithm. This book is not a reference book, and is meant to be read in order from front to back. The material is written expecting readers to follow along with the coding examples and to the suggested exercises. By following the book, readers will gain a thorough understanding of Stanza's fundamental mechanisms and coding style.
For absolute beginners to programming, the pace of the first chapter will feel a bit fast, and readers are encouraged to take their time to understand and experiment with the examples. When I was young, I taught myself to program by reading Beginning Java 2 by Ivor Horton, and one of the goals of this book is to help beginners get started with programming in the same way that Mr. Horton's book has helped me. Once you get the hang of it, programming is an extremely creative and satisfying endeavor.
I hope you enjoy the book, and Stanza.
For those people that would prefer an offline version of the book, you can also find a PDF version here.
This chapter explains how to download and install Stanza for your system, compile the example programs, and also write your own very first Stanza program.
This chapter introduces the basic programming constructs in Stanza. After this chapter, you'll be able to write basic programs that do simple things.
This chapter teaches some constructs in Stanza that you may not be familiar with coming from other languages.
This chapter teaches you how to organize and architect large programs using Stanza's class-less object system.
This chapter teaches you how to use functions as values, which is one fundamental part of the functional programming paradigm.
This chapter teaches you how to program using Stanza's sequence abstraction, as well as how to make full use of the core sequence library.
This chapter teaches you how to program using datastructures that cannot be changed after being initialized. This is the other fundamental part of functional programming paradigm.
This chapter teaches you how to define types that are themselves parameterized by other types. After this chapter, you will be able to define datastructures and libraries that are as general and as powerful as the ones included with Stanza.
This chapter teaches you about Stanza's advanced control flow constructs, as well as about the fundamental mechanism underlying all of them: the targetable coroutine system.
This chapter summarizes and explains the mechanisms behind Stanza's optional type system in more depth.
This chapter teaches you write programs that interact with code written in other languages. It will teach you how to call functions written in other languages, and how to write Stanza functions meant to be called from other languages.
Stanza has a number of convenience constructs that make your life easier, but they are not necessary for day to day programming. You may skim through this appendix and learn about these constructs as their need arises.
|Site design by Luca Li. Copyright 2015.|