Re: Do you currently use namespaces?

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

ken mortenson wrote:
> 
> Never.
> 
> Matt Lewis wrote:
> >How else would you have solved the problem?
> 
> 1) An instance of a class does not have this problem.
> 
> 2) DLL's may have functions with the same name which is resolved in
>    the function call declaration by assigning an alias.
> 
> Euphoria is not inherently modular because it uses the INCLUDE paradigm.
> Other languages use a project file paradigm.

I'm coming in late on this discussion, but how does include make it not modular?
For instance here is some of my code:

include user.e as user
include note.e as note

sequence notes
user:user current
current = user:get(1)
notes = note:get_all_for(current)


user.e is included in many different command line utilities/gui apps. It can be
used independent of any other. That's modular and using include?

> 
> Most functions and variables should not be public and their scope should
> be limited to the file they are declared in.
> 

Yes, that's just good practice and that's what I do above.

> Explicitly public functions and variables should have descriptive names
> which are less likely to conflict (but since even then they could, using
> classes would still be the solution.)

Yes, again, that's just good practice. I do not see how what you said is making
Euphoria not modular? Can you expand a bit?

--
Jeremy Cowgar
http://jeremy.cowgar.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu