[Gambas-user] C like #include for Gambas

Randall Morgan rmorgan62 at ...626...
Mon Jun 11 20:40:42 CEST 2012


Hi Jussi,

I don't think that OOP by itself replaces #includes. No more than OOP would
replace SVN, CVS, Merc, etc.. Look at any reasonably sized C/C++ project
and you'll see plenty of includes. I think the real issue here is the
language choice.

Gambas provides file management for it's projects. Using Gambas you can get
file management for free by splitting a project into many classes which in
Gambas results in the IDE managing these as different files. This is not
necessarily the case with other OOP languages.

So I think we agree on #includes not being the "best" solution for file
management under Gambas, however, I think our reasoning differs...

I'd also think that if an old project has grown to the point that someone
is looking for a way to manage it's files, then it has matured to a point
where refactoring the program would result in better long term management
of the project.




On Mon, Jun 11, 2012 at 10:38 AM, Jussi Lahtinen
<jussi.lahtinen at ...626...>wrote:

> > As I see it include is a pre-processing directive. It simply replaces the
> > #include statement with
> > the contents of an external file. This is a project management
> > consideration and not a programming paradigm i.e. OOP, Functional,
> > Procedural, etc..
>
>
> I agree, but I think with OOP, C style #include is obsolete management
> choice.
>
>
>
> The include statement in C/C++ was intended to allow
> > libraries of code to be pulled into the current project.
>
>
> Here is the main point.
> In Gambas we already have Extern, Export etc commands for external
> libraries,
> whether they are written with Gambas, C or whatever.
>
>
>
>
> > Allowing the developer to split a large project up into smaller, more
> > manageable files.
> >
>
> With OOP I don't think you need to do that with files, you do it with
> classes.
> But maybe someone want to write code with non-OO style.
>
>
>
>
> > Contrast this to Ada's use of packages.
> >
>
> I don't know Ada, so I cannot say anything it being useful in Gambas.
>
>
>
> As for includes, I think this could be a useful tool for some but wonder
> > why simply refactoring the program into
> > more manageable class' wouldn't give a better solution. IMHO, doing so
> > would make the project more maintainable over the long haul....
> >
>
> I agree.
>
>
>
> Jussi
>
> ------------------------------------------------------------------------------
> 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
>



-- 
If you ask me if it can be done. The answer is YES, it can always be done.
The correct questions however are... What will it cost, and how long will
it take?



More information about the User mailing list