CODIGO
log in

Hack

Hack logo

Summary

Hack is a dialect of PHP developed by Facebook that adds static typing, generics, and other features while maintaining compatibility with PHP. It runs on the HipHop Virtual Machine (HHVM) and offers improved performance and type safety.

Paradigms

imperative, object-oriented, functional, structured

Domains

web development, server-side applications

Key Features

algebraic data types, type inference, traits/interfaces, async/await, generics

Typing

gradual system, structural typing, weak typing, full inference, compile-time checking, conservative type coercion, optional type annotations

Compilation

compiled, interpreted with JIT compilation

Influenced By

PHP, OCaml, TypeScript, Scala, C#, Haskell, Java

Ratings

Startup time
▊▊
▊▊
▊▊
▊▊
▊▊
Memory usage
▊▊
▊▊
▊▊
▊▊
▊▊
Computation speed
▊▊
▊▊
▊▊
▊▊
▊▊
Compilation speed
▊▊
▊▊
▊▊
▊▊
▊▊
Maturity
▊▊
▊▊
▊▊
▊▊
▊▊
Community size
▊▊
▊▊
▊▊
▊▊
▊▊
Learning resources
▊▊
▊▊
▊▊
▊▊
▊▊
Job market demand
▊▊
▊▊
▊▊
▊▊
▊▊
Learning curve
▊▊
▊▊
▊▊
▊▊
▊▊
Cognitive load
▊▊
▊▊
▊▊
▊▊
▊▊
Syntax complexity
▊▊
▊▊
▊▊
▊▊
▊▊
Semantic complexity
▊▊
▊▊
▊▊
▊▊
▊▊
Memory safety
▊▊
▊▊
▊▊
▊▊
▊▊
Concurrency ease of use
▊▊
▊▊
▊▊
▊▊
▊▊
Std lib maturity
▊▊
▊▊
▊▊
▊▊
▊▊
Std lib size
▊▊
▊▊
▊▊
▊▊
▊▊
Backwards compatibility
▊▊
▊▊
▊▊
▊▊
▊▊
Documentation quality
▊▊
▊▊
▊▊
▊▊
▊▊

File extensions

hack, hh, hhi, php

External Links

Status active
Type programming
Created 2014
Designed by Facebook Engineering Team
Developed by Facebook
Meta Platforms
PyPL Index N/A
TIOBE Index #51-100
GitHub rank #23

Code Example

Loading...