--- import BaseLayout from "../layouts/BaseLayout.astro"; import Navbar from "../components/Navbar.astro"; import HeroSection from "../components/HeroSection.astro"; ---

A modern, type safe, secure language compiled to PHP

Inspired by Rust, Zig and Kotlin, THP has a modern syntax, semantics, type system and stdlib.



Any { ... } // Compile error: Cannot use \`Any\` without an explicit cast val result = mock() // Ok val result = mock() as String `} > THP enforces type safety at compile time and, at the programmer's request, at runtime.

Everything has a type. There are generics. No implicit type conversions. No mixed. No client Any .Type inference included.

All possible checks are made at compile time. Runtime checks have a small performance penalty.
Make invalid state irrepresentable.
Model data in a type-safe way.
Ensure all cases are handled.
Match on values, tuples, enums, unions, types etc.
Guards available!
Nulls are explicit and require handling. Types are nullable, and they are used everywhere they are needed.

Nullable types must be explicitly checked before using them.