Euphoria ver 2.3

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

I hope version 2.3 is going to allow FORWARD REFERENCES
  instead of the stupid routine_id()

Rob:

  Why can't you just allow a user to redefine a routine if
  the routine has the exact same parameter list.

  Here is my idea:
  
  A user creates a empty prototype function ( dummy function
  with NO CODE INSIDE OF IT ) at the beginning of his
  program ( just after the include files ) for any routine they wish
  to use in a forward reference.
  When the interpeter parses the program and if it finds a
  redefinition of the prototype and the parameters are exactly the
  same then the interpeter replaces the definition with the new
  definition. This replacement would only be allowed once ! 
  
  ERROR conditions that can occur are:
    1. A prototype is trying to redefine a function in a include
       file.
    2. A function is trying redefine a prototype with a different
       parameter list.
    3. A function is being redefined more than once.
    4. A function is being redefined that was not prototyped just
       after the include files ( the prototype functions list end
       when the first function that CONTAINS CODE inside it is 
       encountered by the interpter). 

  The above errors would cause the same error message that we get
  with the present interpeter.

  Programs would be easier to read and follow, compiled code could
  be used in DLL's because routine_id is not needed.
  The old programs would still work the same way because no code
  would be broken.
  
Bernie

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

Search



Quick Links

User menu

Not signed in.

Misc Menu