[Gambas-user] C like #include for Gambas

jm joem at ...2671...
Sat Jun 9 00:16:10 CEST 2012


C like #include files for gambas?

Sounds a bit harsh I know, but is it possible to add a feature
that functions like a C #include?

The logic behind is to address programs that are growing
out of control in size. These are working megalithic programs that
have had years of code piled on top of other code.
The code has lost none of their lustre and needs to be
expanded even more and that bit is being held up
by this issue:

If I break down programs into modules, then there is a huge
overhead in passing parameters.

If I break it down into classes, there is still a huge overhead
in setting up classes and passing data around.

These are programs that require hundred(s) of parameters to be
set up if they are to pass data around to do one simple thing
correctly.

I have no problems doing it, but its boring and now becoming
prone to mistakes in the way the parameters are being set up,
and the order in which objects are being created.
It is difficult to keep track of thousands of things at the
same time.

So I was thinking, it would be better to allow gambas programs
to grow in size to reduce the number of different ways the
objects are set up. But that is fatal, because you just can't find stuff
quickly enough when you got tens of thousands of lines.

I also program in C, and #include is a common way to
pull in stuff from all over the place. It is a way to
pull in mega numbers of .h and .c program files from all over the place
and make a huge program without actually writing uneditable huge
programs.

The individual .c and .h programs make life so easy to debug
and mix and match files as you need it by using a #include
at the time and place you need it.
Each of the .h and .c programs are separately maintained.
Because there is only one .h file or one .c file,
there is never any mistakes during duplication.

If gambas supported #include, it would be possible
to use #include to pull in variable declarations,
and snippets of well trodden code as needed without having
to copy and paste that would otherwise end up with numerous copies
of similar code. Instead there will be just a couple
of files that gets pulled in as needed with a #include.

Any chance of sneaking in this productivity enhancing feature? :-)



______________________________________________________________________________
This message has been checked for viruses and spam by Corpex using
the ArmourPlate Anti Virus and Anti Spam Scanning Service.
To find out more and see our email archiving service see
http://www.armourplate.com or call Corpex on UK 0845 050 1898.




More information about the User mailing list