Combining languages using metaprogramming — PScript
Haapala, Lassi (2024-07-22)
Combining languages using metaprogramming — PScript
Haapala, Lassi
(22.07.2024)
Julkaisu on tekijänoikeussäännösten alainen. Teosta voi lukea ja tulostaa henkilökohtaista käyttöä varten. Käyttö kaupallisiin tarkoituksiin on kielletty.
avoin
Julkaisun pysyvä osoite on:
https://urn.fi/URN:NBN:fi-fe2024072562605
https://urn.fi/URN:NBN:fi-fe2024072562605
Tiivistelmä
This thesis introduces a novel multistage preprocessor solution, PScript. PScript is built to improve upon the existing server-to-client relationship between PHP and JavaScript. These improvements are presented through standardised design goals and code-level PScript implementations. The improvements are achieved through the PScript preprocessor, which introduces a set of additional features into the existing multistage environment. These features include direct improvements such as scoping of existing JavaScript code and hygienic variable transfers between PHP and JavaScript. Additionally PScript provides a set of features based on the concepts of metaprogramming and multistage languages, e.g., conditional compilation and expression injection. Ultimately, the thesis argues that through these features PScript is able to improve upon the PHP-JavaScript relationship both in usability, efficiency and clarity.