Daniel Bergey Commotion

Programming exercise

I’ve written an xTalk-to-PHP interpreter. I’m not sure how useful it will be for web scripting, but it was a good exercise. Still is, actually, since it’s not done yet. I think I have expression parsing pretty well along, but parentheses precedence needs some work. I may just need to reorder some code. If you’re not familiar with xTalk, here’s an example of some valid code, which counts to 100 by 5s:

put the square root of 25 into myVar repeat 20 times   add 1 to counter   echo counter times myVar & return end repeat

The idea is that it’s self-explanatory, and easy to write. It’s not particularly compact, and it’s best suited for OOP applications. I guess I’ll finish it and see if anyone out there likes it. At least I can feel like Patrick now, hacking away at obscure projects for fun in the middle of the night.

Now that I Google for it, I see that someone has put together a comparision of xTalk and Javascript. My feeling is that though an xTalk-to-Javascript interpreter would make more sense from an OOP standpoint, it would be very heavy code-wise, which would be counterproductive to those who try to keep page load times down. But of course, once the interpreter is downloaded, it’s cached and wouldn’t be gotten again.

Stuff to think about.