Re: Euphoria Interpreter design

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

>As to the mutually-callable include files... I've run into problems there
>myself; I don't see how a scope change addresses it
though. Even if it fit the >example below, the new scope wouldn't necessarily
have to allow mutual inclusion--if that were the
case, the global scope should be able to do it. I >would think that mutual
inclusion isn't allowed soley to enforce
declare-before-use, not as a side effect of the current global scope rules.

Mutual inclusion wouldnt be able with the current scope or it would mean, that
when you define something 'globally' in your
file, its also mutually accesable from within that file. Something it appears
almost nobody wants. But I do want mutual
inclusion is such way its routines can mutually call the routines of the files
it includes. If you include it, it should appear
as if the code was included at that point. Without that, include files are not
more than an illusion of seperate parts of your
program. You should simply not be able to modify what the include file sees,
unless by modifying things it actually included.
Thats the real and whole concept behind 'seperate' part of code, the idealogy
behind an include file, I hope.

> haven't decided yet if I want to see a break in the declare-before-use design
> in order to allow mutual inclusion, or for any
other reason... both >positions have strong points.

Surely, I understand the points of linear order *within* an include file, but Im
extremely curious how many of those points hold
up when include files are the issue.. eh.. none.

Rod Jackson

----------
From:   Lucius Hilley III[SMTP:lhilley at CDC.NET]
Sent:   Thursday, February 25, 1999 2:18 PM
To:     EUPHORIA at LISTSERV.MUOHIO.EDU
Subject:        Re: Euphoria Interpreter design

On Thu, 25 Feb 1999 07:35:28 +0100, Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL>
wrote:

>
>Btw, Robert, considering this, wouldnt it be able to routine_id () a
global or local variable and/or constant and have it work
>like a function (with zero arguments) ?
>
>Nevertheless, im not convinced. I still want mutally callable include
files. I dont mind a forced linear order *within* the
>include file. (local scope only thus).
>
>Ralf

I agree here.  I don't feel this is an issue of define-it-before-you-use-it.
I feel this is a scope issue that should have been cleared up long ago.
IE:
--   image.e    --
include graphics.e
--CODE

-- MyProgram --
include custom.e
include image.e

--image.e has access to custom.e global routines, variables and constants.
--ALSO
-- MyProgram has access to all of graphics.e global routines and variables.

I feel that image.e should not have access to custom.e globals
I also feel that I MyProgram should not have access to graphics.e globals.

This is clearly and issue of scope. I feel that access to globals of an
include file should only be available to the code that implicitly included
the file.

        Lucius L. Hilley

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

Search



Quick Links

User menu

Not signed in.

Misc Menu