My Account Log in

1 option

Hack HHVM : programming productivity without breaking things / Owen Yamauchi.

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Yamauchi, Owen, author.
Language:
English
Subjects (All):
Virtual computer systems--Programming.
Virtual computer systems.
Hack (Computer program language).
Physical Description:
1 online resource (272 p.)
Edition:
First edition.
Place of Publication:
Sebastopol, CA : O'Reilly, 2015.
System Details:
text file
Summary:
How can you take advantage of the HipHop Virtual Machine (HHVM) and the Hack programming language, two new technologies that Facebook developed to run their web servers? With this practical guide, Owen Yamauchi—a member of Facebook’s core Hack and HHVM teams—shows you how to get started with these battle-tested open-source tools. You’ll explore static typechecking and several other features that separate Hack from its PHP origins, and learn how to set up, configure, deploy, and monitor HHVM. Ideal for developers with basic PHP knowledge or experience with other languages, this book also demonstrates how these tools can be used with existing PHP codebases and new projects alike. Learn how Hack provides static typechecking while retaining PHP’s flexible, rapid development capability Write typesafe code with Hack’s generics feature Explore HHVM, a just-in-time compilation runtime engine with full PHP compatibility Dive into Hack collections, asynchronous functions, and the XHP extension for PHP Understand Hack’s design rationale, including why it omits some PHP features Use Hack for multitasking, and for generating HTML securely Learn tools for working with Hack code, including PHP-to-Hack migration
Contents:
Copyright; Table of Contents; Foreword; Preface; What Are Hack and HHVM?; Who This Book Is For; Philosophy; Program Types; Gradual Migration; How the Book Is Organized; Versions; Conventions Used in This Book; Safari® Books Online; How to Contact Us; Acknowledgments; Chapter 1. Typechecking; Why Use the Typechecker?; Setting Up the Typechecker; Autoload Everything; Reading Error Messages; Type Annotation Syntax; Function Return Types; Function Parameters; Properties; Hack's Type System; Typechecker Modes; Code Without Annotations; Calling into PHP; Rules; Using Superglobals
Types of Overriding MethodsProperty Initialization; Typed Variadic Arguments; Types for Generators; Fallthrough in switch Statements; Type Inference; Variables Don't Have Types; Unresolved Types; Inference Is Function-Local; Refining Types; Refining Nullable Types to Non-Nullable; Refining Mixed Types to Primitives; Refining Object Types; Inference on Properties; Enforcement of Type Annotations at Runtime; Chapter 2. Generics; Introductory Example; Other Generic Entities; Functions and Methods; Traits and Interfaces; Type Aliases; Type Erasure; Constraints; Unresolved Types, Revisited
Generics and SubtypesArrays and Collections; Advanced: Covariance and Contravariance; Syntax; When to Use Them; Chapter 3. Other Features of Hack; Enums; Enum Functions; Type Aliases; Transparent Type Aliases; Opaque Type Aliases; Autoloading Type Aliases; Array Shapes; Lambda Expressions; Constructor Parameter Promotion; Attributes; Attribute Syntax; Special Attributes; Enhanced Autoloading; Integer Arithmetic Overflow; Nullsafe Method Call Operator; Trait and Interface Requirements; Silencing Typechecker Errors; Chapter 4. PHP Features Not Supported in Hack; References; The global Statement
Top-Level CodeOld-Style Constructors; Case-Insensitive Name Lookup; Variable Variables; Dynamic Properties; Mixing Method Call Syntax; isset, empty, and unset; Others; Chapter 5. Collections; Why Use Collections?; Collections Have Reference Semantics; Using Collections; Literal Syntax; Reading and Writing; Type Annotations for Collections; Core Interfaces; General Collection Interfaces; Specific Collection Interfaces; Concrete Collection Classes; Interoperating with Arrays; Conversion to Arrays; Use with Built-In and User Functions; Chapter 6. Async; Introductory Examples; Async in Detail
Wait HandlesAsync and Callable Types; await Is Not an Expression; Async Generators; Exceptions in Async Functions; Mapping and Filtering Helpers; Structuring Async Code; Data Dependencies; Antipatterns; Other Types of Waiting; Sleeping; Rescheduling; Common Mistakes; Dropping Wait Handles; Memoizing Async Functions; Async Extensions; MySQL; MCRouter and memcached; cURL; Streams; Chapter 7. XHP; Why Use XHP?; Runtime Validation; Secure by Default; How to Use XHP; Basic Tag Usage; Attributes; Embedding Hack Code; Type Annotations for XHP; Object Interface; Validation
Creating Your Own XHP Classes
Notes:
Includes index.
Description based on online resource; title from PDF title page (ebrary, viewed January 20, 2016).
ISBN:
9781491920831
1491920831
9781491920862
1491920866
9781491920855
1491920858
OCLC:
922007855

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.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account