Namespaces

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

----- Original Message -----
From: Irv Mullins <irv at ELLIJAY.COM>
Sent: Monday, September 27, 1999 3:55 AM
Subject: Re: little question once again


> Rob has promised that the namespace problem will next on his list of
> things to do. I have no idea how he will accomplish this, but I personally
> prefer the method you suggest - using the include file name as the prefix,
eg:
> foo.position(3.5)  bar.position(5,5)  which leads to more of an object
oriented
> approach to building programs. Not a bad thing IMHO.

Hello all,

I am sitting here reading my daily digest of all the best info on Euphoria
and very much enjoying the little discussion on the subject of "Re: little
question once again".  When Irv brings this very intriguing concept to the
surface anout include files not getting along with each other.  There is
something that we all can do to help, instead of relying on 'Rob' to solve
all the little problems.  Of course this "fix" would be the responsibility
of every one of us that cares.

You said that it would be nice if, in order to access a routine from an
include file that you had to use that files name as a prefix to the routine.
I think this sounds like a great idea although possibly cumbersome if
someone wanted to name their include file something like
'thisismyincludefileforfubar.e'.  However in the spirit of best wishes.  You
could take on the responsibility of applying the prefix process and just
name you routines in the include file with a specific prefix.

-- this is foo.e
-- the routines in this file do next to nothing
-- use them at your own risk

global constant
    foo_Nil = nil,
    foo_Max=+inf

global procedure foo_up(object anyjunk)
    anyjunk = foo_Nil        -- throw it away
end procedure

global function foo_down(object morejunk)
    morejunk = foo_Max
    return(morjunk)
end function

-- this has been an example of worthless programming
-- I claim no responsibilities whatsoever for the content or how you use it
-- thank you for your attention

Now, in order to use any of the stuff in 'foo.e' you would be forced to add
the foo_whatever prefix because that is now a part of the variable name.
Also if you do this.  Rob is not forced to make changes if he doesn't want
too.  Of course.  If that is something that he planed to do anyway..........

L8R

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

Search



Quick Links

User menu

Not signed in.

Misc Menu