Re: Global = root of all evil

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

> Subject: Re: Global = root of all evil
>
>
>
>
> On Thu, 02 Nov 2006 06:41:32 -0800, ags <guest at RapidEuphoria.com>
> wrote:
>
> >I think the error message would be something like 'call to undefined
> >function y()', ie any routine without a namespace is assumed to be in=

> >the 'main' source file, as you would expect.
> My apologies, I thought I was talking to someone who had a clue.
> <cue flame war; trust me I'll dig my heels in to get my point across
> and am unlikely to pull many punches...>
>
> DUHH! we're talking about MULTIPLE y()! The WHOLE point was that it
> should NOT */ASSUME/* a specific y(): How, in god's shit, does:
> "eg fr:f(fr:x(),y(),fr:z())  should flag the y() missing namespace,"
> NOT make that clear? Did in any bizzarre sense you imagine there was
> NO included fr:y() or something?
>
> Did in any bizzarre sense you imagine that I felt it would be /RIGHT/
> to /ASSUME/ the local y()?
>

Obviously it is right.
When you call a global from your own code, you may or may not expect it
to be redefined. Eu should allow you, the coder, to decide. I'd advocate
the following extra keyzords
1/ generic: this would replace "global" zhen the coder allows
redefinition of the symbol he created.
2/ restricted: this symbol is not to be seen outside the current file
and the files it includes;
3/ undefine: this is a request for the given outside symbol not to get
in the way inside the current filem and any zhich would include it.

At any rate, if the intention of the coder is obvious, he must be able
to state it in a way obvious to readers of the code, /without
restricting/ much what he's able to code. The latter is perhaps why Eu
is so little known after 13 years of being around.

</snip>

> I firmly believe that eg:
> }}}
<eucode>
> include win32lib.ew
> function create()
> </eucode>
{{{

> /SHOULD/ trigger an error (because it is a redefinition of a direct
> include). Otoh, two sub/third-party-"components" both defining eg
> abs() should not be a problem (and each use "their own").
>

One should be able to define any local symbol without getting any error,
except when redefining inside the same file. And yet, using namespace
blocks (your idea a while ago_ should allow to override this. So, I'd
say a flat no to any error here. Optionally a zrning, asuming it could
be of any use.

CChris
--
=20=20
  cchris005 at fastmail.fm

--
http://www.fastmail.fm - Same, same, but different=85

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

Search



Quick Links

User menu

Not signed in.

Misc Menu