Re: Initializing constants once, with code?

From: Date: Wed, 08 Jan 2020 21:25:50 +0000
Subject: Re: Initializing constants once, with code?
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  Groups: php.internals 
Request: Send a blank email to internals+get-108041@lists.php.net to get a copy of this message
> On Jan 8, 2020, at 11:10 AM, Robert Hickman <robehickman@gmail.com> wrote: > > My suggestion was not a preprocessor, but what others have said > already, a 'shim' that goes between the parser/lexer and bytecode > generation which allows user code to inspect and modify the AST. This > idea is not unusual and Python for example can do this. The idea is > the basis of macro systems in Lisps, and Rust has a very nice > implementation of it from what I've seen in passing. The system should > be fully aware of the syntax, scoping, namespaces etc, the lack of > which is the problem with C preprocessor for example. > > With regards to how JAI does this: > > https://www.youtube.com/watch?v=UTqZNujQOlA > > https://www.youtube.com/watch?v=59lKAlb6cRg&list=PLmV5I2fxaiCKfxMBrNsU1kgKJXD3PkyxO&index=20&t=0s Nice! Never heard of JAI but will be checking it out. -Mike

« previous php.internals (#108041) next »