Re: Do you currently use namespaces?

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

Jason Gade wrote:

Good observations Jason, this post provides a lot to chew on.

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

If I may, I think the weirdness come from the fact that it overlaps a lot
of distinct issues.  My feeling is that often we try to solve the wrong
problem.  We lose sight of the goal in the battle over nitty-gritty
brain-twisters.

Is name collision the big issue?  Maybe not.  Is getting namespaces to
work the goal?  Mayby not.  Is the goal itself for some limited short
term objective (to get a new version out) or is it something greater?

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

Sometimes I'm not sure I understand my own concerns. blink I do think that
some concepts are not well shared because of peoples different experience
and focus.

To better understand my concerns, you have to understand that I have a
clear and specific vision of what I want due to my years of work, but 
my experience may not be the same as others with different experience.
I'm looking for a very specific tool that could be but isn't.  Most
people seem to just want to 'improve' this language by fixing some
observed apparent issues.  I'm very strongly in the school of thought
that often less is more.  To me, namespaces add complexity (not perhaps
so much in usage as in other ways) without the sufficiently offsetting
benefit.

People will argue that namespaces provides a means of creating modular
code.  They might be right.  The whole idea of includes and namespaces
would, for me, preclude reaching the level of modularity I desire.
 
> 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. 

In the 1975, I thought ten thousand was a lot of lines of code (and a
complete project.)  Now that's just one of many hundreds of modules.
 
> 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.

I would say that is an example of modular thinking.  Like I say, programmers
write modules, languages don't.
 
> 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.

System software is a different animal from applications in my book.  Think
of machine language.  If your high level language provides access to ML then
you already have GOTO in your language even if it's not a specific keyword.

My feeling however, is that a good HLL aught to be able to compile itself
which to me is a test of it's expressiveness.  Euphoria scores very highly
in expressiveness.  One of my comcerns is losing that expressiveness with
unneeded features (and missing needed features.)

Even having the addition of...

namespace:function() over just function() is the addition of impurity in
the language (admittedly a matter of taste) even though I am a big fan
of dot notation...  Instance.method() which some may consider to be
similar.  I do hate the blah.blah.blah.dosomething() version of dot
notation.

All I know is that with the right tools I can crank out a huge quantity
of rock solid code and have great joy in the process producing something
that in turn will please others.

I want that!!!

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

Search



Quick Links

User menu

Not signed in.

Misc Menu