Measures Concepts
GitHub icon

tht

tht - Programming language

< >

tht is a programming language created in 2017.

Source code:
git clone https://github.com/joelesko/tht
#1051on PLDB 7Years Old

THT Programming Language


Example from the web:
// Familiar variable and List syntax. $colors = ['red', 'blue', 'green']; // New JSON-style syntax for Maps $colorHex = { red: '#FF0000', green: '#00FF00', blue: '#0000FF', }; // Built-in types have methods using // the mainstream 'dot' syntax. $colors.push('purple'); // Extra parens aren't needed. if $colors.length() > 3 { $colors.pop(); } // The standard library is organized // into modules. Response.sendPage({ title: 'Colors', body: bodyHtml($colors), }); // Template Functions let you organize // your output (views) however you like. // (e.g. by component, module, file, etc.) template bodyHtml($colors) { <h1>Colors</> <ul> -- foreach $colors as $c { <li>{{ $c.toUpperCaseFirst() }}</> -- } </> }

Language features

Feature Supported Token Example
Comments ✓
// A comment
Line Comments ✓ //
// A comment
Semantic Indentation X

HackerNews discussions of tht

title date score comments
Show HN: THT – a cleaner, safer language that compiles to PHP 09/03/2017 3 0

View source

- Build the next great programming language · Search · Add Language · Features · Creators · Resources · About · Blog · Acknowledgements · Queries · Stats · Sponsor · Day 605 · feedback@pldb.io · Logout