Changes
This commit is contained in:
parent
b152e52e59
commit
5cb7e89087
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
node_modules
|
node_modules
|
||||||
static/css
|
static/css
|
||||||
|
static/learn
|
||||||
|
@ -2,10 +2,39 @@
|
|||||||
|
|
||||||
Welcome to the documentation of the THP programming languague.
|
Welcome to the documentation of the THP programming languague.
|
||||||
|
|
||||||
|
THP is a new programming language that compiles to PHP.
|
||||||
|
|
||||||
## Goals
|
## 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
|
## Philosophy
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Compared to PHP
|
## Compared to PHP
|
||||||
|
|
||||||
### Differences
|
### Differences
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<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>
|
</head>
|
||||||
<body class="bg-c-bg text-c-text">
|
<body class="bg-c-bg text-c-text">
|
||||||
<div class="px-2 grid grid-cols-2 gap-4 relative">
|
<div class="px-2 grid grid-cols-2 gap-4 relative">
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<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>
|
</head>
|
||||||
<body class="bg-c-bg text-c-text">
|
<body class="bg-c-bg text-c-text">
|
||||||
<div class="grid grid-cols-[10rem_12rem_auto] gap-2">
|
<div class="grid grid-cols-[10rem_12rem_auto] gap-2">
|
||||||
|
@ -16,8 +16,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
"mono": ["Inconsolata", "Iosevka", "monospace"],
|
"mono": ["Inconsolata", "Iosevka", "monospace"],
|
||||||
"display": ["'Fugaz One'", "Inter", "'Fira Sans Extra Condensed'", "sans-serif"],
|
"display": ["'Fugaz One'", "Inter", "'Fira Sans Condensed'", "sans-serif"],
|
||||||
"body": ["'Fira Sans Extra Condensed'", "Inter", "sans-serif"],
|
"body": ["'Fira Sans Condensed'", "Inter", "sans-serif"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [],
|
plugins: [],
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Fira Sans Extra Condensed', Inter, sans-serif;
|
font-family: 'Fira Sans Condensed', Inter, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre, code {
|
pre, code {
|
||||||
|
Loading…
Reference in New Issue
Block a user