Re: Do you currently use namespaces?
- Posted by Jeremy Cowgar <jeremy at c?wgar.co?> May 26, 2008
- 1021 views
ken mortenson wrote: > > Am I up to the challenge? If you write code like this you have problems: FileA.e
global function do_a() .... global function hello_a() ...
FileB.e
global function do_b() ... global function hello_b() ...
FileC.e
do_a() hello_b()
MyProg.ex
include FileA.e include FileB.e include FileC.e --- this has to be included last because it ------------------- it depends on FileA and FileB ------------------- ------------------- This is *horrible* coding.
In the above program, FileC.e should be rewritten as: FileC.e
include FileA.e include FileB.e do_a() hello_b()
MyProg.ex
include FileC.e include FileA.e include FileB.e ---- Notice... Order has zero affect on anything. ---- ---- This is proper coding.
-- Jeremy Cowgar http://jeremy.cowgar.com