1. The complexity of double pass interpreter

I found this text:


It remembers me that Rob Craig allways said that interpreter must to do a single reading pass on the source file and that procedures must to be declared prior to called. A more flexible programming style involves more complexity layers on the interpreter (and longer execution times)

Marco A

new topic     » topic index » view message » categorize

2. Re: The complexity of double pass interpreter


Both Eu and Phix can call procedures and functions declared after being called. It is just habit that I always declare them first. Some other languages require name declaration before use, but then allow the actual function/procedure to be written later on in the program.

Function/procedure namespaces in includes (IMHO) confuse the issue, because, as I see it, Eu has a 'sideways' include system, whereas Phix has a 'flat file' system.

I'm sure that I could write a demo to demonstrate this, but it has been done adequately before elsewhere. There are good reasons for both, I just prefer one.

By the way, I've just solved the SDL2 screenshot method - I'm so proud right now.



new topic     » goto parent     » topic index » view message » categorize


Quick Links

User menu

Not signed in.

Misc Menu