Re: Do you currently use namespaces?

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

I've been following this thread and I think some things are kinda... weird.

I think I understand Ken's concerns, and I find some of CChris' styles much like
goto-spaghetti-code.

I think I also understand that massive libraries such as Win32lib have special
requirements.

Maybe I'm just short-sighted because I've only written programs with a few
hundred lines of code instead of a few thousand.

To me, a .e file has both state and interface. Much like an object. I include
files that my program depends upon at the top of the program. Include files
should never look at information in the main program. The main program should
never rely upon the state or the interface of .e files that it does not
explicitly include.

If I was writing a library, which I have not done yet, I would try and make sure
that each individual file was almost completely decoupled from any other file,
except when building blocks. If two files needed to share some mutual state then
I guess that I would write a third file to interface in between them.

So maybe the only modules I'm really used to are in Java and C++ classes, and
the way that C handles include files.

Much like "goto", you can abuse the scope and include system of Euphoria. But
you don't have to do so.

Of course, you wouldn't know that from looking at the interpreter source code
smile.

--
A complex system that works is invariably found to have evolved from a simple
system that works.
--John Gall's 15th law of Systemantics.

"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare

j.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu