Re: Real world example of the includes-with-the-same-name "bug"

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

Jason Gade wrote:

> I'm not sure what you mean here. Relative and absolute paths already work
> properly.
> They use the OS file routines which resolve this automatically, I believe.

Correct, but I have to convert the "new_include_name" strings into a full paths
otherwise they wont compare correctly.

> I think we're talking about different things -- I'm not sure. I didn't think
> Euphoria had any problems with slashes and backslashes and dots. I just tested
> it and it worked as I expected.
> 
> What I thought we were talking about is this: (from the manual)
> 
> -- quote --
> Other than possibly defining a new namespace identifier (see below), an
> include
> statement will be quietly ignored if a file with the same name (but possibly
> located in a different directory) has already been included.
> -- quote --
> 
> This is the behavior that is considered a 'bug' by almost everyone except Rob.
> 
> *I* think that programs could be both more modular and/or more object-oriented
> if it worked as follows:
> 
> * Quietly ignored if the *exact* same file is included twice without a
> namespace
> identifier
> * Treated as separate files if a namespace identifier *is* included
> * Treated as separate files if includes are in a different path
> * Give a warning and/or an error if there is a global symbol conflict and no
> namespace identifier in the above cases
> 
> I think this is the major reason why Derek Parnell left -- it was considered
> a bug by Rob Craig and a great feature by almost everyone else.
> 
> --
> "The author regrets that he is unable to reconcile himself to the
> thoughtful point of view you have expressed. However, it must be kept
> in mind that being raised in different cultures and different places can
> result in such differences of viewpoint between individuals.
> The author is from planet Earth." [author unknown]
> 
> j.

My system basically treats all files with the same name but located in different
directories as different files. Including the same file in the same directory
more than once will ignore the consecutive callings. The functionability your
talking about is known as instance including (I believe) and would be simple to
implement when namespace identifers are used.


Regards,
Vincent

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

Search



Quick Links

User menu

Not signed in.

Misc Menu