Re: Secret new routine_id() feature. (Attn: Rob)
- Posted by Derek Parnell <ddparnell at bigpond.com> Dec 09, 2004
- 723 views
Robert Craig wrote: > > Andy Serpa wrote: > > I just noticed that in v2.5, routine_id() can now "see ahead" and give you > > routine > > numbers for functions occuring below in the code or in files including after > > the current > > one (if the routine is global). This new ability is not in the release > > notes, and > > the docs for routine_id() still say the routine must be "visible" to get the > > routine > > number. > > > > I assume this stems from the fact that all the code is now parsed in > > advance. While > > this is a welcome change, it begs the question: why not now allow full > > forward referencing > > and let us call routines defined below in the code directly? > > > > [ Rob: if you actually did not know of this new ability, which I suspect > > since it is > > not mentioned anywhere, please leave it that way. ] > > Thanks for reporting this bug. ARRGGGHH! It is *not* a bug. It is an improvement. It can actually help people write better code. > It will be fixed in the beta release. I believe you spelled the colloquial word for copulation incorrectly, it is not spelled 'fixed' > It looks like only the interpreters (PD and RDS) have the bug. What 'bug'? You have actually got it right, now. > Translated code, bound code, and shrouded code seem to work correctly. You need to fix these then so that they can be just as helpful as the interpreter. > Even in 2.4 and earlier, many programs were parsed completely, > or almost completely, before routine_id() was executed. > I think it's better from a language design point of view that > routine_id() looks only at earlier routines, not later. That's just one point of view. Other points of view are just as valid but you prevent your customers from having the freedom of choice. You just impose your view on us. > My reasons are: > 1. I like to torture people. This I can now believe. I suspect you are not joking. > 2. Check the EUforum archive for the other reasons. There are no reasons - just opinions. Please justify why the absence of forward referencing for routines is a good thing. And there are other messages in EUForum for supporting other valid points of view too. I'm begging...please don't destroy this good thing. Please. BTW, Robert, are you ignoring me? Messages and emails that I've sent to you continue to go unanswered. -- Derek Parnell Melbourne, Australia