Robert Craig please respond to this :)

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

Vincent wrote:
> 
> I would really like to see a 'import' statement that is the same
> as 'include' but it's scope is Local. I dont really like the way
> 'include' is implemented and how it's defualt scope is global.
> 
> I think that a aditional feature called 'import' or w/e appropriate
> that would do the same as 'include' but make that include only
> visible in the program or code file that uses the 'import' statement
> and the included file ofcource. While the 'inlcude' statement can
> remain the same, but with any filepath issues fixed.
> 
> Therefore with 'import' a include file cant be called indirectly
> unintentionaly. I think that would help fix any issues regarding
> peoples ruitines or varibles conflicting with external ruitines or
> varibles that may be named the same as the the varibles in the main
> program, or w/e. I think it would also make the namespacing feature
> more useful? Plus it would give the programmer more control
> over their code.
> 
> exp:
> 
> }}}
<eucode>
> import "C:/Euphoria/Test.e"
> </eucode>
{{{

> 
> I also think that because the 'include' statment isn't being
> modified that there wouldnt be any issue regarding compatability
> with older code.
> 
> I could suggest changes in the current scoping system and namespace
> feature. But I understand that some people may want code
> compatability and that may be alot ask Rob at one time.
> 
> But I can live with all that, and am willing to what quite a while
> for Eu 2.5 or 2.6 for the implementation of 'import' or somthing
> like that.
> 

So what there is ways to get around this problem, the fact the
problem exists, and that it doesn't have to should be all
the reason to implement a feature like 'import' that will
be just like 'include' but it won't have a global scope it
would be public to the program or code file that imported
it and the imported file it self (pass values back and
forth if needed from imported file it self and the program
or code file that imported it) so therefor we would have
more control over the code. We then wouldn't have to worry about
accidently indirectly including files unless we want to.
The name colisions could be avoided without additional
attention on the coders part, and it wont effect
compatability with past EU versions, librarys, or anything
because the 'include' statement is not being changed.

The 'include' statement will still be useful but 'import'
would be useful in the cases where we only want to include
a code file into that specific program or code file. And
NOT everyfile that may indirectly include it through
including the program that directly included that code file
or w/e unintentionaly. Plus like I said I think it would fix
any problems with conflicting ruitine names or varible names.
that people sometimes incounter. It would make the current
namespacing feature would be more relavent I think,
and of course any future improvements would be execlent.

Euphoria is a great language but I want the 'import' feature
some way implemented. I might be over reacting but i want
my voice to be heard in this situation.

I could be wrong, but if so tell me how I'm I wrong, and
tell me why it should'nt be implemented.

I would appriacate any response u might have for this
feature request :))

Thanks

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

Search



Quick Links

User menu

Not signed in.

Misc Menu