Regular expressions in GnuCash

Dean Gibson gnucash.stuff at mailpen.com
Mon Sep 26 14:14:32 EDT 2016


On 2016-09-26 05:23, Derek Atkins wrote:
> ... Almost everything (storage, search, etc) is based on the 
> underlying data object definition. Text is text. Number is number. 
> There is no "text treated as number". To do that would require 
> defining a new data type, which would involve updating all the front 
> and back ends to handle that appropriately.
> -derek

I agree.

Unfortunately, complicating the world view of this, is that some 
computer languages automatically make the conversion.  PHP is one, and I 
think SQL will also do the conversion in very narrow circumstances.

However, as I understand it, GnuCash is written in C (and/or C++), and I 
agree with that decision.  Auto-conversion has huge headaches, with the 
most common being user confusion when some conversion unexpectedly (to 
the user) does or does not happen. Complicating this, is that most 
strings are compared left-adjusted, and all numbers are compared 
right-adjusted.

There's a good reason for "data-typed" languages, even if it initially 
appears to be more work.



More information about the gnucash-user mailing list