Even though foo() isn't defined yet, perl recognizes it as a function yet to be defined by the syntax(like your tags), so it holds off reporting an error as long as possible (runtime, when it tries to call it)$ perl -c -e " foo(1); " -e syntax OK
$ perl -e " foo(1); " Undefined subroutine &main::foo called at -e line 1.
H.O.P is all about this approach, build a tree, walk the tree, modify the tree, compute
The computable things are defined by syntax < > [ ] ( ), whether they'll actually compute or be returned verbatim is delayed until runtime
Like perl, TT2 takes the approach that if its not computable, its an error, not a string substitution
Your blind spot seems to be your current implementation -- you keep thinking in terms of substitution s/// instead of function/method calls -- even s/// is not really substitutions, its a series of function/method calls -- each call to s/// is a walk of the tree (flat tree, a string)
In reply to Re^6: hrm, Eval::Compile
by Anonymous Monk
in thread hrm, Eval::Compile
by Logicus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |