1. Ten Modules or Less == Using Namespaces

A suggested design for those that want to program by including a single, monolithic, monster, module. You can create an include file that includes all other includes.

A practical design ends up with ten modules. This is based on the organization the developers used in creating the Standard Library.

This is all described in the wiki:

http://openeuphoria.org/wiki/view/Modules.wc

Yes, you will have to use namespace prefixes to make things work. I do not believe this is much of a burden since namespace prefixes can be ignored in most programs and freely altered. In an OO-style language you must always use a class prefix . In a hardwired scheme you must always type the required prefixes. The O[ design requires less typing and is very flexible.

_tom

new topic     » topic index » view message » categorize

2. Re: Ten Modules or Less == Using Namespaces

_tom said...

A suggested design for those that want to program by including a single, monolithic, monster, module. You can create an include file that includes all other includes.

A practical design ends up with ten modules. This is based on the organization the developers used in creating the Standard Library.

This is all described in the wiki:

http://openeuphoria.org/wiki/view/Modules.wc

Hmm...I don't think this is particularly useful (compared to the actual organization of the library blink ), but I would have thought that primes.e would fit better into the math bundle than data. I suppose it went into data since it's used by map.e?

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: Ten Modules or Less == Using Namespaces

I copied the module organization from a manual.af file (which may be an old version by now.)

I welcome suggestions on how to better organize this suggested module organization. It also needs testing to see if it is really practical.

Hopefully something like this can be designed to make it simpler for newcomers to O[ to adapt to our ways.

An "official" organization will probably not please everyone which is why I want to emphasize: roll your own.

_tom

new topic     » goto parent     » topic index » view message » categorize

4. Re: Ten Modules or Less == Using Namespaces

mattlewis said...

I don't think this is particularly useful.

Agreed. I think it's important to understand what-comes-from-where. Abstracting the include files in the manner leaves programmer "blind" as to where things are located.

What we really need is a good syntax-highlighting editor that can suggest what to include when it cannot find an function, type, or constant. Hey, wasn't I working on that? Yeah, I haven't been lately. sad

-Greg

new topic     » goto parent     » topic index » view message » categorize

5. Re: Ten Modules or Less == Using Namespaces

ghaberek said...

What we really need is a good syntax-highlighting editor that can suggest what to include when it cannot find an function, type, or constant. Hey, wasn't I working on that? Yeah, I haven't been lately. sad

You're absolutely right. I use this all the time with java in Eclipse. Hmm...I think I already have most of what I need coded into wxIDE to do this.

Matt

new topic     » goto parent     » topic index » view message » categorize

6. Re: Ten Modules or Less == Using Namespaces

_tom said...

A suggested design for those that want to program by including a single, monolithic, monster, module. You can create an include file that includes all other includes.

A practical design ends up with ten modules. This is based on the organization the developers used in creating the Standard Library.

This is all described in the wiki:

http://openeuphoria.org/wiki/view/Modules.wc

Yes, you will have to use namespace prefixes to make things work. I do not believe this is much of a burden since namespace prefixes can be ignored in most programs and freely altered. In an OO-style language you must always use a class prefix . In a hardwired scheme you must always type the required prefixes. The O[ design requires less typing and is very flexible.

_tom

I am glad you have taken the right direction

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu