3 options
D cookbook : discover the advantages of programming in D with over 100 incredibly effective recipes / Adam D. Ruppe.
EBSCOhost Academic eBook Collection (North America) Available online
EBSCOhost Academic eBook Collection (North America)- Format:
- Book
- Author/Creator:
- Ruppe, Adam D., author.
- Language:
- English
- Subjects (All):
- D (Computer program language)--Research.
- D (Computer program language).
- Object-oriented programming languages--Congresses.
- Object-oriented programming languages.
- Physical Description:
- 1 online resource (362 p.)
- Edition:
- 1st ed.
- Place of Publication:
- Birmingham, England : Packt Publishing, 2014.
- Language Note:
- English
- Summary:
- A recipe-packed reference guide filled with practical tasks that are concisely explained to develop and broaden the user's abilities with the D programming language. If you are an experienced programmer who is looking to explore a language that offers plenty of advantages over more established programming languages, this is the book for you. We assume that you are already familiar with general programming language basics, but you do not need to be a proficient user of D.
- Contents:
- Cover; Copyright; Credits; Foreword; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Core Tasks; Introduction; Installing the compiler and writing a ""Hello World"" program; Adding additional modules (files) to your program; Using external libraries; Building and processing arrays; Using associative arrays to translate input; Creating a user-defined vector type; Using a custom exception type; Understanding immutability; Slicing a string to get a substring; Creating a tree of classes; Chapter 2: Phobos - The Standard Library; Introduction
- Performing type conversionsFinding the largest files in a directory; Creating a network client and server; Using Base64 to create a data URI; Generating random numbers; Normalizing a string and performing Unicode comparisons; Searching with regular expressions; Writing a digest utility; Using std.zlib compression; Using the std.json module; Chapter 3: Ranges; Introduction; Using ranges when implementing an algorithm; Creating an input range; Creating an output range; Creating a higher-order range; Putting a range interface on a collection; Creating an input range over a tree structure
- Using runtime polymorphic (class) rangesStoring a range as a data member; Sorting ranges efficiently; Searching ranges; Using functional tools to query data; Chapter 4: Integration; Introduction; Calling the Windows API functions; Removing the Windows console; Making Linux system calls; Writing part of a C program in D; Interfacing with C++; Using structs to mimic the C++ object structure; Communicating with external processes; Communicating with a dynamic scripting language; Using Windows' COM; Chapter 5: Resource Management; Introduction; Avoiding the garbage collector
- Making a reference-counted objectManually managing class memory; Using scope guards to manage transactions; Creating an array replacement; Managing lent resources; Creating a NotNull struct; Using unique pointers; Using RAII and handling the limitations of class destructors; Chapter 6: Wrapped Types; Introduction; Creating a struct with reference semantics; Simulating inheritance with structs; Creating a ranged integer; Creating an opaque handle type; Creating a subtyped string for i18n; Forwarding methods with opDispatch; Creating a tagged dynamic type
- Creating a structure with two views into the same dataSimulating multiple inheritance with mixin templates; Chapter 7: Correctness Checking; Introduction; Using assertions and exceptions; Using static assert; Using template constraints and static if; Preventing memory corruption bugs with @safe; Leveraging const-correctness; Avoiding side effects of pure functions; Verifying object invariants and pre- and post-conditions; Unit testing your code; Documenting your code with Ddoc; Writing platform-specific code (versions) and per-client configuration modules; Chapter 8: Reflection; Introduction
- Getting dynamic runtime type information
- Notes:
- "Quick answers to common problems."
- Includes index.
- Description based on online resource; title from PDF title page (ebrary, viewed June 4, 2014).
- ISBN:
- 9781783287222
- 1783287225
- OCLC:
- 881035342
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.