This commit is contained in:
Araozu 2023-06-30 20:00:17 -05:00
parent b152e52e59
commit 5cb7e89087
6 changed files with 35 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
node_modules
static/css
static/learn

View File

@ -2,10 +2,39 @@
Welcome to the documentation of the THP programming languague.
THP is a new programming language that compiles to PHP.
## Goals
- Bring static typing to PHP: Not just type hints, not use `mixed` for everything
that isn't a primitive type.
- Avoid automatic type conversion.
- Remove the inconsistencies in the language.
- Organize the stdlib.
- Differentiate between Arrays, Tuples, Maps and Sets.
- Create a **consistent** language.
- Create typings for popular libraries (like TS's `.d.ts`).
- Have a simple instalation and configuration (requiring just Composer).
- Ship a fast, native binary (not written in PHP).
- Sub 10ms watch mode.
- Support in-place compilation.
- Emit readable PHP code (but not meant to be edited).
- Implement a LSP server.
## Not goals
These are **not** aspects that THP looks to solve or implement.
- Be what TypeScript is for JavaScript.
- Use PHP syntax/conventions.
-
## Philosophy
## Compared to PHP
### Differences

View File

@ -11,7 +11,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Extra+Condensed&family=Fugaz+One&family=Inconsolata&family=Inter&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Condensed:wght@400;500;600;700;800;900&family=Fugaz+One&family=Inconsolata&family=Inter&display=swap" rel="stylesheet">
</head>
<body class="bg-c-bg text-c-text">
<div class="px-2 grid grid-cols-2 gap-4 relative">

View File

@ -12,7 +12,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Extra+Condensed:wght@400;500;600;700;800;900&family=Fugaz+One&family=Inconsolata&family=Inter&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Condensed:wght@400;500;600;700;800;900&family=Fugaz+One&family=Inconsolata&family=Inter&display=swap" rel="stylesheet">
</head>
<body class="bg-c-bg text-c-text">
<div class="grid grid-cols-[10rem_12rem_auto] gap-2">

View File

@ -16,8 +16,8 @@ module.exports = {
},
fontFamily: {
"mono": ["Inconsolata", "Iosevka", "monospace"],
"display": ["'Fugaz One'", "Inter", "'Fira Sans Extra Condensed'", "sans-serif"],
"body": ["'Fira Sans Extra Condensed'", "Inter", "sans-serif"],
"display": ["'Fugaz One'", "Inter", "'Fira Sans Condensed'", "sans-serif"],
"body": ["'Fira Sans Condensed'", "Inter", "sans-serif"],
},
},
plugins: [],

View File

@ -27,7 +27,7 @@
}
body {
font-family: 'Fira Sans Extra Condensed', Inter, sans-serif;
font-family: 'Fira Sans Condensed', Inter, sans-serif;
}
pre, code {