From Mathematics to Generic Programming

From Mathematics to Generic Programming

Author: Alexander A. Stepanov

Publisher: Addison-Wesley Professional

Published: 2014-11-13

Total Pages: 311

ISBN-13: 0133491781

DOWNLOAD EBOOK

In this substantive yet accessible book, pioneering software designer Alexander Stepanov and his colleague Daniel Rose illuminate the principles of generic programming and the mathematical concept of abstraction on which it is based, helping you write code that is both simpler and more powerful. If you’re a reasonably proficient programmer who can think logically, you have all the background you’ll need. Stepanov and Rose introduce the relevant abstract algebra and number theory with exceptional clarity. They carefully explain the problems mathematicians first needed to solve, and then show how these mathematical solutions translate to generic programming and the creation of more effective and elegant code. To demonstrate the crucial role these mathematical principles play in many modern applications, the authors show how to use these results and generalized algorithms to implement a real-world public-key cryptosystem. As you read this book, you’ll master the thought processes necessary for effective programming and learn how to generalize narrowly conceived algorithms to widen their usefulness without losing efficiency. You’ll also gain deep insight into the value of mathematics to programming—insight that will prove invaluable no matter what programming languages and paradigms you use. You will learn about How to generalize a four thousand-year-old algorithm, demonstrating indispensable lessons about clarity and efficiency Ancient paradoxes, beautiful theorems, and the productive tension between continuous and discrete A simple algorithm for finding greatest common divisor (GCD) and modern abstractions that build on it Powerful mathematical approaches to abstraction How abstract algebra provides the idea at the heart of generic programming Axioms, proofs, theories, and models: using mathematical techniques to organize knowledge about your algorithms and data structures Surprising subtleties of simple programming tasks and what you can learn from them How practical implementations can exploit theoretical knowledge


Generic Programming

Generic Programming

Author: Jeremy Gibbons

Publisher: Springer

Published: 2013-04-17

Total Pages: 249

ISBN-13: 038735672X

DOWNLOAD EBOOK

Generic programming is about making programs more adaptable by making them more general. Generic programs often embody non-traditional kinds of polymorphism; ordinary programs are obtained from them by suitably instantiating their parameters. In contrast with normal programs, the parameters of a generic program are often quite rich in structure; for example, they may be other programs, types or type constructors, class hierarchies, or even programming paradigms. Generic programming techniques have always been of interest, both to practitioners and to theoreticians, but only recently have generic programming techniques become a specific focus of research in the functional and object-oriented programming language communities. Generic Programming comprises the edited proceedings of the Working Conference on Generic Programming, which was sponsored by the International Federation for Information Processing (IFIP) and held in Dagstuhl, Germany in July 2002. With contributions from leading researchers around the world, this volume captures the state of the art in this important emerging area.


Generic Programming and the STL

Generic Programming and the STL

Author: Matthew H. Austern

Publisher: Addison-Wesley Professional

Published: 1999

Total Pages: 584

ISBN-13:

DOWNLOAD EBOOK

Introduces programmers to the generic programming paradigm and to the C++ Standard Template Library and its use as an extensible framework for generic and interoperable components. Explains ideas underlying generic programming and shows how to create algorithms decoupled from the types and data structures they operate on, and how to write more efficient code that can be used and reused across platforms. Assumes familiarity with C++ and algorithms. Annotation copyrighted by Book News, Inc., Portland, OR


Modern C++ Design

Modern C++ Design

Author: Andrei Alexandrescu

Publisher: Addison-Wesley

Published: 2001-02-13

Total Pages: 352

ISBN-13: 0133387615

DOWNLOAD EBOOK

Modern C++ Design, Andrei Alexandrescu opens new vistas for C++ programmers. Displaying extraordinary creativity and programming virtuosity, Alexandrescu offers a cutting-edge approach to design that unites design patterns, generic programming, and C++, enabling programmers to achieve expressive, flexible, and highly reusable code. This book introduces the concept of generic components–reusable design templates that produce boilerplate code for compiler consumption–all within C++. Generic components enable an easier and more seamless transition from design to application code, generate code that better expresses the original design intention, and support the reuse of design structures with minimal recoding. The author describes the specific C++ techniques and features that are used in building generic components and goes on to implement industrial strength generic components for real-world applications. Recurring issues that C++ developers face in their day-to-day activity are discussed in depth and implemented in a generic way. These include: Policy-based design for flexibility Partial template specialization Typelists–powerful type manipulation structures Patterns such as Visitor, Singleton, Command, and Factories Multi-method engines For each generic component, the book presents the fundamental problems and design options, and finally implements a generic solution. In addition, an accompanying Web site, http://www.awl.com/cseng/titles/0-201-70431-5, makes the code implementations available for the generic components in the book and provides a free, downloadable C++ library, called Loki, created by the author. Loki provides out-of-the-box functionality for virtually any C++ project. Get a value-added service! Try out all the examples from this book at www.codesaw.com. CodeSaw is a free online learning tool that allows you to experiment with live code from your book right in your browser.


Datatype-Generic Programming

Datatype-Generic Programming

Author: Roland Backhouse

Publisher: Springer Science & Business Media

Published: 2007-11-30

Total Pages: 379

ISBN-13: 3540767851

DOWNLOAD EBOOK

This tutorial book presents six carefully revised lectures given at the Spring School on Datatype-Generic Programming, SSDGP 2006. This was held in Nottingham, UK, in April 2006. It was colocated with the Symposium on Trends in Functional Programming (TFP 2006), and the Conference of the Types Project (TYPES 2006). All the lectures have been subjected to thorough internal review by the editors and contributors, supported by independent external reviews.


Generic and Indexed Programming

Generic and Indexed Programming

Author: Jeremy Gibbons

Publisher: Springer

Published: 2012-07-20

Total Pages: 266

ISBN-13: 3642322026

DOWNLOAD EBOOK

Generic programming is about making programs more widely applicable via exotic kinds of parametrization---not just along the dimensions of values or of types, but also of things such as the shape of data, algebraic structures, strategies, computational paradigms, and so on. Indexed programming is a lightweight form of dependently typed programming, constraining flexibility by allowing one to state and check relationships between parameters: that the shapes of two arguments agree, that an encoded value matches some type, that values transmitted along a channel conform to the stated protocol, and so on. The two forces of genericity and indexing balance each other nicely, simultaneously promoting and controlling generality. The 5 lectures included in this book stem from the Spring School on Generic and Indexed Programming, held in Oxford, UK, in March 2010 as a closing activity of the generic and indexed programming project at Oxford which took place in the years 2006-2010.


Elements of Programming

Elements of Programming

Author: Alexander Stepanov

Publisher: Lulu.com

Published: 2019-06-17

Total Pages: 282

ISBN-13: 0578222140

DOWNLOAD EBOOK

Elements of Programming provides a different understanding of programming than is presented elsewhere. Its major premise is that practical programming, like other areas of science and engineering, must be based on a solid mathematical foundation. This book shows that algorithms implemented in a real programming language, such as C++, can operate in the most general mathematical setting. For example, the fast exponentiation algorithm is defined to work with any associative operation. Using abstract algorithms leads to efficient, reliable, secure, and economical software.


Programming with Types

Programming with Types

Author: Vlad Riscutia

Publisher: Simon and Schuster

Published: 2019-10-31

Total Pages: 531

ISBN-13: 1638350264

DOWNLOAD EBOOK

Summary Programming with Types teaches you to design safe, resilient, correct software that’s easy to maintain and understand by taking advantage of the power of strong type systems. Designed to provide practical, instantly useful techniques for working developers, this clearly written tutorial introduces you to using type systems to support everyday programming tasks. About the technology Common bugs often result from mismatched data types. By precisely naming and controlling which data are allowable in a calculation, a strong type system can eliminate whole classes of errors and ensure data integrity throughout an application. As a developer, skillfully using types in your everyday practice leads to better code and saves time tracking down tricky data-related errors. About the book Programming with Types teaches type-based techniques for writing software that’s safe, correct, easy to maintain, and practically self-documenting. Designed for working developers, this clearly written tutorial sticks with the practical benefits of type systems for everyday programming tasks. Following real-world examples coded in TypeScript, you’ll build your skills from primitive types up to more-advanced concepts like functors and monads. What's inside Building data structures with primitive types, arrays, and references How types affect functions, inheritance, and composition Object-oriented programming with types Applying generics and higher-kinded types About the reader You’ll need experience with a mainstream programming language like TypeScript, Java, JavaScript, C#, or C++. About the author Vlad Riscutia is a principal software engineer at Microsoft. He has headed up several major software projects and mentors up-and-coming software engineers.


Cybernetics in C++

Cybernetics in C++

Author: Avi Bhattacharyya

Publisher: CRC Press

Published: 2022-09-01

Total Pages: 664

ISBN-13: 1000794962

DOWNLOAD EBOOK

C++ is a powerful, much sought after programming language, but can be daunting to work with, even for engineering professionals. Why is this book so useful? Have you ever wondered:- How do keywords like static and virtual change their meanings according to context?- What are the similarities and differences between Pointers and References, Pointers and Arrays, Constructors and Copy Constructors, Nested and Local Inner Classes?- Why is Multiple Interface Inheritance seen to be beautiful but Multiple Implementation Inheritance considered evil?- When is Polymorphism Static or Dynamic, Bounded or Unbounded?Answers on these questions, and much more, are explained in this book, Cybernetics in C++. What makes this text so different and appealing in comparison to existing books on the market?- The Bulleted style, as opposed to Prose, produces results much faster, both in learning and reference- Rules of Thumb, and further expert Tips are given throughout in how to optimise your code- The Prospective Evils sections tell you what to avoid- The thorough coverage ensures you will be trained to expert level in each of Imperative, Procedural, Memory & Resource Management, Object Oriented and Generic ProgrammingCybernetics in C++ combines a theoretical overview and practical approach in one book, which should prove to be a useful reference for computer scientists, software programmers, engineers and students in this and related field.


Programming

Programming

Author: Bjarne Stroustrup

Publisher: Addison-Wesley Professional

Published: 2024-04-10

Total Pages: 2088

ISBN-13: 0138308640

DOWNLOAD EBOOK

An Introduction to Programming by the Inventor of C++ Programming: Principles and Practice Using C++, Third Edition, will help anyone who is willing to work hard learn the fundamental principles of programming and develop the practical skills needed for programming in the real world. Previous editions have been used successfully by many thousands of students. This revised and updated edition Assumes that your aim is to eventually write programs that are good enough for others to use and maintain Focuses on fundamental concepts and techniques, rather than on obscure language-technical details Is an introduction to programming in general, including procedural, object-oriented, and generic programming, rather than just an introduction to a programming language Covers both contemporary high-level techniques and the lower-level techniques needed for efficient use of hardware Will give you a solid foundation for writing useful, correct, type-safe, maintainable, and efficient code Is primarily designed for people who have never programmed before, but even seasoned programmers have found previous editions useful as an introduction to more effective concepts and techniques Covers a wide range of essential concepts, design and programming techniques, language features, and libraries Uses contemporary C++ (C++20 and C++23) Covers the design and use of both built-in types and user-defi ned types, complete with input, output, computation, and simple graphics/GUI Offers an introduction to the C++ standard library containers and algorithms Register your book for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details.