diff --git a/md/learn/index.md b/md/learn/index.md index 7b95447..6d8f90a 100644 --- a/md/learn/index.md +++ b/md/learn/index.md @@ -18,7 +18,7 @@ THP is a new programming language that compiles to PHP. - 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). +- Emit readable PHP code. - Implement a LSP server. @@ -26,14 +26,19 @@ THP is a new programming language that compiles to PHP. These are **not** aspects that THP looks to solve or implement. -- Be what TypeScript is for JavaScript. +- Be what TypeScript is for JavaScript (PHP with types). - Use PHP syntax/conventions. -- +- Be familiar for PHP developers. ## Philosophy +- Consistency over familiarity +- Change over conventions +- Explicit over implicit +That is, while there is value in the items on +the right, we value the items on the left more. ## Compared to PHP diff --git a/static/index.html b/static/index.html index 119e39e..63b480a 100644 --- a/static/index.html +++ b/static/index.html @@ -17,7 +17,7 @@
thp groups all global variables and function of PHP into modules, @@ -108,7 +112,7 @@ print("There are {persons?.length ?? 0} persons regis
val colors = Array("red", "blue", "green") + >val allowedColors = Array("red", "blue", "green") val response = match colors.search("purple") { - Some(_) -> "purple is a color!" - None -> "purple is not a color" + Some(_) -> "purple is allowed!" + None -> "purple is not allowed" } print(response)diff --git a/static/template.html b/static/template.html index a6bd089..8953ef0 100644 --- a/static/template.html +++ b/static/template.html @@ -16,9 +16,9 @@