Re: Gnucash c++

2014-08-13 Thread Gour
On Tue, 5 Aug 2014 11:04:00 -0700
John Ralls jra...@ceridwen.us wrote:

Hello all,

 What is the motivation for compiling everything as C++ if it's still
 really C and you have to wrap everything in extern C {} to get it
 to link, especially in gnome and register directories, which can't be
 converted to C++?

when I visited #gnucash the other day I heard about the plan to (slowly) move
to C++.

Although I'm aware that I do not have 'currency' to influence the switch, I'd
just like to give my 0.02hrk (1$ ~ 5.8hrk) and propose to (just) consider using
Go language instead.

Here is nice article http://talks.golang.org/2012/splash.article explaining
about the reason to conceive the language which is solving some of the
performance problems encounted when building large C++ apps.

Moreover, it is meant to be easily approachable for the developers being
familiar with C (which is not really the case with C++) and we could say that
Go is kind of 'modern C'.

Not wanting to go deeper into any sort of argumentation being more than happy
that Gnucash is givne to me for free this is just attempt to my side in order
to provide some feedback to make GC even better developer-wise.


Sincerely,
Gour

-- 
The work of a man who is unattached to the modes of material 
nature and who is fully situated in transcendental knowledge 
merges entirely into transcendence.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Gnucash c++

2014-08-13 Thread Derek Atkins
Gour g...@atmarama.net writes:

 On Tue, 5 Aug 2014 11:04:00 -0700
 John Ralls jra...@ceridwen.us wrote:

 Hello all,

 What is the motivation for compiling everything as C++ if it's still
 really C and you have to wrap everything in extern C {} to get it
 to link, especially in gnome and register directories, which can't be
 converted to C++?

 when I visited #gnucash the other day I heard about the plan to (slowly) move
 to C++.

 Although I'm aware that I do not have 'currency' to influence the switch, I'd
 just like to give my 0.02hrk (1$ ~ 5.8hrk) and propose to (just) consider 
 using
 Go language instead.

Ummm.. No.

The benefit of C - C++ is that except for a few minor issues with
keywords you can *generally* compile C code using the C++ compiler and
it will *just work*.  The same cannot be said for Go or any other
language.

Please read the FAQ entry on Why don't you (re)write GnuCash in your
favorite language at http://wiki.gnucash.org/wiki/FAQ

-derek

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   warl...@mit.eduPGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Gnucash c++

2014-08-13 Thread Gour
On Wed, 13 Aug 2014 11:21:59 -0400
Derek Atkins warl...@mit.edu wrote:

 Ummm.. No.

OK.

 The benefit of C - C++ is that except for a few minor issues with
 keywords you can *generally* compile C code using the C++ compiler and
 it will *just work*.  

That's clear.

 The same cannot be said for Go or any other language.

Btw, Go team converts Go compiler from C to Go. ;)

 Please read the FAQ entry on Why don't you (re)write GnuCash in your
 favorite language at http://wiki.gnucash.org/wiki/FAQ

Well, being in #gnucash I got the feeling that there is plan to abandon
glib, rewrite the engine and possibly even to consider Qt 'cause
without glib, one is not tied so much to GTK any longer.

Considering that C -- C++ (and taking advantage of it) might be more
strange than C -- Go which is created to be picked easily by C devs, I
did throw my suggestion.

Otoh, I believe that C -- C++ is not to be done in order to just
increase build time.* :-) 
 
* Rob Bike from the Go team says that long build times (~45mins) for C++
* projects was the time when Go was conceived. ;)

I'm aware of FAQ entry, but was thinking that GC is on the verge of
possible (partial) rewrite.


All the best!

Sincerely,
Gour

-- 
One who sees inaction in action, and action in inaction, 
is intelligent among men, and he is in the transcendental position, 
although engaged in all sorts of activities.

-- 
An intelligent person does not take part in the sources of misery, 
which are due to contact with the material senses. O son of Kuntī, 
such pleasures have a beginning and an end, and so the wise man does 
not delight in them.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810



___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Gnucash c++

2014-08-13 Thread John Ralls

On Aug 13, 2014, at 3:42 PM, Gour g...@atmarama.net wrote:

 On Wed, 13 Aug 2014 11:21:59 -0400
 Derek Atkins warl...@mit.edu wrote:
 
 Ummm.. No.
 
 OK.
 
 The benefit of C - C++ is that except for a few minor issues with
 keywords you can *generally* compile C code using the C++ compiler and
 it will *just work*.  
 
 That's clear.
 
 The same cannot be said for Go or any other language.
 
 Btw, Go team converts Go compiler from C to Go. ;)
 
 Please read the FAQ entry on Why don't you (re)write GnuCash in your
 favorite language at http://wiki.gnucash.org/wiki/FAQ
 
 Well, being in #gnucash I got the feeling that there is plan to abandon
 glib, rewrite the engine and possibly even to consider Qt 'cause
 without glib, one is not tied so much to GTK any longer.
 
 Considering that C -- C++ (and taking advantage of it) might be more
 strange than C -- Go which is created to be picked easily by C devs, I
 did throw my suggestion.
 
 Otoh, I believe that C -- C++ is not to be done in order to just
 increase build time.* :-) 
 
 * Rob Bike from the Go team says that long build times (~45mins) for C++
 * projects was the time when Go was conceived. ;)
 
 I'm aware of FAQ entry, but was thinking that GC is on the verge of
 possible (partial) rewrite.

All true, but you missed Derek's point. The advantage of C++ is that one can 
use it with C *in the same file*. That means I can take a C file, tell the 
compiler it's really a C++ file, and compile it almost as-is (that's what 
Aaron's change is about, cleaning up all of the almosts). Then I can make a C++ 
class and move the functionality into it one function at a time, converting the 
C function to a wrapper with C linkage. I can test that against the existing C 
tests, add C++ tests, and move on to the next function. The rest of GnuCash 
can't tell anything's changed; new work now has two versions of the API to use 
depending on whether it's completely new or a modification of existing. If it 
comes time to start the release cycle and the conversion isn't complete, we can 
ship it as-is because nothing's broken.

There other languages like that, but they're all AFAIK tied to particular 
proprietary platforms to some extent: Objective C and Apple, C# and Microsoft, 
Vala and Gtk+. C++ is ISO-standard with an extremely active committee.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel