Ok, I tend to agree partially with flywire on this one.

John, you and I have years of programming experience and to us the default 
value of an 
option is a minor detail.

However I can imagine someone with hardly any development experience at all 
will have a 
much harder time to map the same string used multiple times in the report code 
to the 
output visible on screen. And I sympathize with those that try to create their 
own custom 
reports. So yes, using different sample strings in code (even for default 
values) makes it 
easier to relate output on the report with what's written in the code - before 
- any option is 
changed.

To us this may look like bikeshedding, I think for someone trying to wrap their 
head around 
the gnucash code this may actually help.

And while bikeshedding was mentioned, I'd rather use values like 
"Sample string", "Sample Document Title" and "Sample Report" than the 
half-baked "Hello 
String" and "Hello Example".

As with these changes "Hello, World" is never used, the file name is probably 
better changed 
as well.

Regards,

Geert

Op zaterdag 14 januari 2023 05:47:29 CET schreef john:
> > On Jan 13, 2023, at 6:46 PM, flywire <flywi...@gmail.com> wrote:
> > 
> > The point is not about the changes options make to reports, it's about how
> > the report source code changes the report and report options. Why
> > wouldn't unique string values help people unfamiliar with reports see the
> > relationship more clearly?
> While it's possible in Scheme to take that quoted option value and convert
> it to code I don't know of any report code in GnuCash that does so. That's
> a very good thing, we have enough Scheme-induced vulnerabilities without
> that.
> 
> With that in mind, no, the quoted-string default values do not in any way
> have anything to do with illustrating how the report source code changes
> the report and report options. Nor, for that matter, does hello-world.scm
> illustrate anything of the sort. hello-world.scm simply provides examples
> of the different types of options and very simply displays the values in
> the report. There's not a single line of code that changes the behavior of
> the report based on an option value--unlike many of the real options in
> most of the real reports.
> 
> Regards,
> John Ralls
> 
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel


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

Reply via email to