1. RE: Euphoria ver 2.3

gertie at ad-tek.net wrote:
> On 3 Jun 2001, at 19:22, Bernie Ryan wrote:
> 
> > 
> > 
> >   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.
> 
> Why not allow this?
> 
> function x(sequence a)
> function x(integer b, sequence a)
> function x(atom a)

IMHO it will become very confusing when you get 5 peoples includ files 
and they all have fuctions of the same name, maybe even same prams.

> 
> Then the interpreter can check the passed parms as it does now, and drop 
> them into 
> the correct function. Like this: when the interpreter is running thru 
> the list of functions, 
> and the name is found but parameter list types don't match, store the 
> error, but don't 
> report it, and keep searching the list. If the name and types match 
> later in the list, use 
> it. If the name and types never match, then report the error.
> 
> Kat
> 



Grape Vine
13728824

new topic     » topic index » view message » categorize

2. RE: Euphoria ver 2.3

> -----Original Message-----
> From: Bernie Ryan [mailto:xotron at localnet.com]

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

Given RDS' comments in the past, I doubt this will happen (not that I'm
against it).
 
> Rob:
> 
>   Why can't you just allow a user to redefine a routine if
>   the routine has the exact same parameter list.

This sounds like a good idea.

>   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.

Routine id's work fine in compiled code.  The previous comment regarding
win32lib was pointing out the fact that the dll and the exe will not be
sharing the same routine id space, so calling a routine in the exe from the
dll can't be done simply by passing routine_id's.  

It could still be done with the wrapper for win32lib (which you'll want to
have once it's in a dll).  Any time win32lib calls a handler, it goes
through an intermediary in the wrapper that exists in the same routine_id
space as the user's routines.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu