Re: Resurection of routine_id forward referencing
- Posted by ChrisBurch2 <crylex at freeuk.co.uk> Sep 20, 2006
- 703 views
Greg Haberek wrote: > > > This was forward referencing of routine_id. > > Rob saw this as a bug, and "fixed" it, despite pleas from others, > > especially Derek Parnell, to leave it in. Since Eu is going "open source", > > can this feature be reinstated? I imagine we will need the eu2.5a source, > > and some coding skill that I don't have! > > I for one do see it as a bug. It breaks the top-down format of of > Euphoria. When I need jump back-and-forth between my code and > reference various routines from anywhere, I declare an integer for the > id of each routine I need at the very top of my code, then set that > integer to the id right after the end statement. Allowing one to see > "ahead" into the code breaks the core functionality of Euphoria. Let's > not start this debate again... > > }}} <eucode> > -- declare id integers > integer func2_id > > function func1() > > object i > > i = call_func( func2_id, {} ) > > return 0 > end function > > function func2() > > return 1 > end function > func2_id = routine_id( "func2" ) > </eucode> {{{ > > Hi Just adding to this. This is a very exciting time for eu, and there will be a lot of changes, as poeple add there bits and pieces. There does need to be a _loose_ organisational structure, but make it too restrictive, and people will lose interest. May I please ask that any changes people make retain backwards compatability. I e if you add forward referencing for functions and procedures, then retain the routine_id concept (frankly I like routine_id, but who am I to tell people how to code) - you have the choice of whether to use it or not. Similarly with goto - if you don't want to use it, don't, but if you do, you can. Personally, I would like a continue keyword! If I do ever get that, and someone tries to run Eu with an old interpreter then what? So can we have a VERSION_MAJOR and a VERSION_MINOR global variable. And so on. Interesting times ahead. Chris