[Top] [All Lists]

Re: testing for extensions during run-time

2006-01-12 14:02:47

On Thu, 2006-01-12 at 15:22 -0500, Barry Leiba wrote:
Michael Haardt wrote:
I don't think the base specification unconditionally allows dead
code blocks that contain unknown extensions, like:

  if false {

Does the environment extension focus on the above usage and is it OK if
it enforces implementations to allow unknown extensions in dead code?

this is not the focus of the "environment" extension.  it very well
might better be in a separate extension.

I'm not sure I understand what you mean by any of that.
I *think* you're asking whether the error is generated by the parser or
by the execution, and I believe the answer is "execution".  So if
"unknown_extension" is never executed, there should be no error.

either is allowed.

   Compile-time errors are ones in syntax that are detectable if a
   syntax check is done.
   Implementations MAY choose to do a full parse, then evaluate the
   script, then do all actions.  Implementations might even go so far as
   to ensure that execution is atomic (either all actions are executed
   or none are executed).

Kjetil T.