-
Notifications
You must be signed in to change notification settings - Fork 403
Description
In the course of #4422 the question was raised if numerical literals should really be parsed with the deliberate limitations of structured fields and it has been proposed to keep the (default) formatting SF-compliant, but drop the parsing limitation.
This thicket is to decide on this proposal.
From @dridi in #4422 (comment)_:
I was surprised to see no issue ever opened regarding this new limitation. I see this lack of complaints as some sort of litmus test showing that nobody was doing anything more complicated than simple operations in VCL and that nobody ever had a real case for "advanced" math features.
I have no particular opinion on this topic. Proceeding with a vmod_math will either require silly workarounds like 3141593 / 1000000.0 or back-tracking on sf adoption.
From @nigoroll in #4422 (comment)_:
At this point, I lean towards suggesting to drop the sf-ification when parsing literals (to avoid the silly cases you rightly pointed out), but keep the %.3f formatting and the range limit as imposed by VRT_REAL_is_valid(). With the addition of math.strfromd(), there would at least be an alternative where required.