Re: Secret new routine_id() feature. (Attn: Rob)
- Posted by Andy Serpa <ac at onehorseshy.com> Dec 09, 2004
- 600 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. > It will be fixed in the beta release. > It looks like only the interpreters (PD and RDS) have the bug. > Translated code, bound code, and shrouded code seem to work correctly. > 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. > My reasons are: > 1. I like to torture people. > 2. Check the EUforum archive for the other reasons. > Yeah, that's what I figured. But why do you hate us? What have we ever done to you? At some point your ideas about what's good and what isn't go too far. Are you just sitting there saying to yourself, "Somebody somewhere is going to write code *I* don't approve of -- I must not let that happen." This is something that is in place now (unintentionally, yes, but you can't argue it is hard to achieve), and you're going to take special steps to BLOCK it! I've read your reasons in the past and just reviewed them now -- they're pretty weak and only have to do with coding style. Having to jump through a bunch of extra hoops just to be able to discover a routine number and then pass it to the right place when it is *ALREADY AVAILABLE* for us is outrageous. This lifts a MAJOR burden with some types of programs. I'm surprised you haven't forced a certain style of indentation on us.