Re: routine_id evaluation

new topic     » goto parent     » topic index » view thread      » older message » newer message

Matt Lewis wrote:

> I guess I finally understand what
> you're talking about: forward referencing
> (although that's not how you're phrasing it).

Consider the following examples:

   -- example 1: fails

   function get_id( sequence s )
      ? routine_id(s)
   end function

   procedure bar()
   end procedure

   if get_id("bar") != routine_id("bar") then
      puts( 1, "failed" )
   end if


   -- example 2: doesn't fail

   procedure bar()
   end procedure

   function get_id( sequence s )
      ? routine_id(s)
   end function

   if get_id("bar") != routine_id("bar") then
      puts( 1, "failed" )
   end if

I respectfully submit that to claim that get_id is performing a "forward
reference" here while routine_id is not is simply absurd. And Robert doesn't
even make that claim. He's explained that the only reason it behaves this
was to is to make it inconvenient for people to use that feature.

-- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu