[Gambas-user] C like #include for Gambas

Jussi Lahtinen jussi.lahtinen at ...626...
Mon Jun 11 17:42:21 CEST 2012


I think this;
"object1.object_within_object.object_within_that_object.method(parameters1,..)"
can be avoided with good object design. I still can't see real usage for
#include.
Also should be noticed that new keywords are justified only if they have
general usage.

But after all this is decision of Benoit, whether he sees usage for
#include or not.

Jussi





On 11 June 2012 11:10, jm <joem at ...2671...> wrote:

> Hi Bruce,
>
> The broadest difference between #include (and its cousins #define,
> #undefine, #ifdef, #ifndef and #endif) and OO programming is that
> #include is a preprocessing command that gets to work long before a
> program gets to run.
>
> Using #include and its cousins, the idea is to build big readable
> programs with the least amount of physical typing effort when used
> responsibly.
>
> I think if it gets pitched as a battle between OO and non-OO
> programming, the debate is still probably winnable by providing lots of
> examples where OO programming leads to more work. Basically if all the
> #include functionality is performed in OO, you got to
> keep track of objects, and as programs get more complex the syntax will
> grow which is excessive physical typing and leads to this method of
> writing programs:
>
>
> object1.object_within_object.object_within_that_object.method(parameters1,..)
>
> This can also turn into run time expense by having to dereference stuff.
>
> [I guess that will in turn let the OO camp will post ample examples of
> programming that leads to confusion where a use a of a #include
> is used irresponsibly and has altered programming behaviour in
> unexpected ways.
> This in turn will allow the #include camp to post more example where
> OO behaviour leads to unexpected results confusing the programmer.
>
> Lets not go there!!
> ]
>
> Instead of that, it is simpler to put aside the OO v non-OO debate
> and focus on merits of gambas having pre-processing functions
> as a subject in its own right.
>
> A #include that bolts together programs as needed.
> When the run button is pressed on the IDE, the idea is that gambas will
> do the pre-processing and stitch together the files to make a giant file
> save it to disk as say file_name_to_run.expanded and then run that
> expanded file.
>
> When debugging, there will have to be some kind of option to switch
> between expanded version of the file and non-expanded version of the
> file.
>
>
> Any chance of sneaking in this pre-processing
> productivity enhancing feature? :-)
>
>
>
>
> On Sat, 2012-06-09 at 23:30 +0930, Bruce wrote:
> > On Sat, 2012-06-09 at 13:51 +0100, jm wrote:
> > > On Sat, 2012-06-09 at 02:45 +0300, Jussi Lahtinen wrote:
> > > > Maybe I'm just too tired, but I don't understand the point.
> >
> > Jussi, maybe I'm just too old as well as tired, but I can't grasp the
> > point of taking an object oriented language and trying to jam an old
> > (albeit well tested) non-OO concept into it.
> >
> > Joe, I am having some degree of trouble really understanding your value
> > proposition. Especially the last post (which I have snipped in entirety,
> > sorry). All I can grasp from reading it several times is that you feel
> > that #include has some productivity value in providing what we call
> > inheritance and polymorphism.
> >
> > I am not trying to put you down but I really can't grasp the ideas of
> > "thousands" of parameters and "hundreds" of initialisations.
> >
> > { We, here at paddys-hill have tens of clients (well a few tens anyway )
> > that use a dozen or so applications, the code base encompasses around
> > two hundred or so classes and modules organized into around thirty
> > components and libraries.  The total code size is less than 25,000 lines
> > and I would guess that probably 60% or more of that is comments. At a
> > guess, the "largest" method calls would be 7 parameters, and they are
> > just convenience calls to a class constructor.  By far the "largest"
> > chunk of code is a library that downloads the text of around 40 web
> > pages a day (about 40,000 text lines), parses them, normalises them and
> > uploads them to the central database. I just checked and it's 6345 lines
> > of code, so about 2400 working lines, which are mainly involved in text
> > parsing (things like discerning "Mac Donald" and "MacDonald" or "Miss
> > Jane O'Donnel" and "Ms Jan ODonnell" are the same names). The primary
> > application that uses this library runs once a day and adds about 1200
> > rows to a central postgresql database and can update anywhere between 2
> > and 10,000 other rows.  It takes "about" 10 minutes.  The central
> > database has just over 3.2 million rows, the clients each have a
> > sub-mirrored database of who-knows-what size.}
> >
> > Anyway, I hope you can see from the above {} that those numbers you are
> > using are fairly un-emotive to the reader.
> >
> > regards
> > Bruce
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > 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
> >
> ______________________________________________________________________________
> > This message has been checked for viruses and spam by Armourplate
> > http://www.armourplate.com, the email archiving, anti virus and anti
> spam
> > service from Corpex.
>
>
>
> ______________________________________________________________________________
> 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