[Gambas-user] C like #include for Gambas

Jussi Lahtinen jussi.lahtinen at ...626...
Sat Jun 9 14:12:09 CEST 2012


Maybe you need to use Export?
http://gambasdoc.org/help/lang/export?v3

Jussi



On 9 June 2012 01:16, jm <joem at ...2671...> wrote:

> 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.
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list