1. Forward References (was: Re: Anxiety over 4.0)
- Posted by Jason Gade <jaygade at ?ahoo.c?m> Jun 11, 2008
- 643 views
CChris wrote: > There was hardly any discussion on the dev list that it should not be added. See, this is where our philosophies differ. I say "why add it" and you say "why not". So, why forward references? And another question, are we talking about doing away with declare before use entirely or just reintroducing the routine_id() "bug" from a couple of years ago? Because while I can support the second item (and that shouldn't be too hard to reintroduce anyway, right?) I'm completely baffled by the idea of doing away with declare before use. So what problem would forward references solve that the current Euphoria include system (with 4.0 improvements) doesn't solve? -- A complex system that works is invariably found to have evolved from a simple system that works. --John Gall's 15th law of Systemantics. "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.
2. Re: Forward References (was: Re: Anxiety over 4.0)
- Posted by Derek Parnell <ddparnell at bigpon?.?om> Jun 11, 2008
- 619 views
Jason Gade wrote: > So what problem would forward references solve that the current > Euphoria include system (with 4.0 improvements) doesn't solve? (1) Having to be forced into a routine_id arrangement for mutually recursive routines (I use these fairly frequently) (2) Having to physically rearrange my source code whenever I happen to add a reference to a routine below. The new location of the now-referred to routine is not always easy to determine and is almost never in a logical place with respect to 'related' routines. For example, I like to group together routines that are related in some manner. But when I'm forced to reorganise because of the lack off forward references, the routine often ends up far removed from its related routines. -- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell
3. Re: Forward References (was: Re: Anxiety over 4.0)
- Posted by CChris <christian.cuvier at agricu??ure.gouv.fr> Jun 11, 2008
- 622 views
Jason Gade wrote: > > CChris wrote: > > There was hardly any discussion on the dev list that it should not be added. > > See, this is where our philosophies differ. I say "why add it" and you say > "why > not". > There have been tons of posts here on he forum about why to add. So, indeed, we shouldn't add only if there is a compelling reason not to add. > So, why forward references? And another question, are we talking about doing > away with declare before use entirely or just reintroducing the routine_id() > "bug" from a couple of years ago? > Declare before use will be reinforced, not abandoned.
forward procedure foo(integer n) -- this is declaring ... foo(3) -- this is using ... procedure foo -- this is defining ?n end procedure
So, instead of tying defining to declaring, forward referencing would make the coder free to define where i is fittest and declare before ANY use. What is your point? I'm missing it. > Because while I can support the second item (and that shouldn't be too hard > to reintroduce anyway, right?) I'm completely baffled by the idea of doing > away > with declare before use. > > So what problem would forward references solve that the current Euphoria > include > system (with 4.0 improvements) doesn't solve? Having to code call_func/proc to call a routine that has to be defined later Having to define global variables to pass routine_ids of such routines. Obfuscating a straightforward static call to foo() into a dynamic call to something that may change. Having a nightmare of a time finding the right place to put a routine definition when it calls a bunch of routines that cannot move around so easily. Having to organise routines not by logical connectedness, but by some technical requirement of a fast parser. Probably forgot some. CChris > > -- > A complex system that works is invariably found to have evolved from a simple > system that works. > --John Gall's 15th law of Systemantics. > > "Premature optimization is the root of all evil in programming." > --C.A.R. Hoare > > j.