Re: Do you currently use namespaces?

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

ken mortenson wrote:
> 
> Jeremy Cowgar wrote:
> >how does include make it not modular?
> >I do not see how what you said is making Euphoria not modular?
> >Can you expand a bit?
> 
> Absolutely,
> 
> Keep in mind that a programmer can write code in a modular language that
> isn't modular and another could write good modules in a language that isn't
> supportive of that.
> 
> Good modules should have certain features.  
> 
> Decoupling is an important principle as well as the principle of
> information hiding.  They don't expose their internal structure but 
> do expose an interface.
> 
> What happens when you include a file?  Everything becomes exposed!
> This, needless to say, does not promote information hiding!
> 
> Let me give you a real example.  I make it a matter of pride that if you
> get a function from me it is complete, works and you will have no problem
> adding it to your code.  I was writing a utility and needed a function
> that a guy I worked with had written.  He insisted I use his function.
> Being my nominal boss at the time it was difficult to refuse.  Anyway, I
> added his code to my tiny little utility and there was a problem.  It had
> ties that were dependant on other parts of his project.  So I had to include
> those (couldn't amputate because that was the nature of his code.)  This
> continued until finally my tiny little utility was the size of his major
> project.  At that point I got my boss involved and let him share some of
> my frustration (I'm generous that way.)  In the end, I wrote what I needed
> without the help of his function.  The guy was a really smart guy, but didn't
> really understand the concept or why it was important.  I find that very
> few programmers I've worked with really do.  This was not an isolated
> incident.

From my admittedly inexperienced vantage point, you are describing something
 which would be expected to reside in a dll, as self contained and fully
 functional to the extent ever intended.

Includes, on the other hand, are intended to be not only included, but extended,
if need be.

In my view, there is a world of difference and, yes, I understand that things
which might be better placed within dlls are instead left within includes for no
good reason other than it is easier to do so.  Much easier because it allows that
completeness you champion to be given short shrift.  I mean, why worry about
completeness if the code is exposed for anybody to improve as they see fit?

But people rarely can predict what portions of their workproduct requires
extending.  So to put virtually anything into a dll loses flexibility.

I'm not sure what this means other than to say that I'm not sure I agree with
your definition of complete.

Mike

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

Search



Quick Links

User menu

Not signed in.

Misc Menu