[postmodern-devel] *silently-truncate-ratios*

Attila Lendvai attila.lendvai at gmail.com
Fri Feb 6 19:29:29 UTC 2009


> But.... 7/10 will be written as 0.7 just fine. Of course, this holds
> for 1/3, but there's no way to do that right, so in effect we'd be
> disallowing the writing of rationals to the db (except in cases where
> the divisor is guaranteed to be something like 10 or 4).


yes, by default disallowing the writing of ratios to the db on which a
store/load operation is not an #'identity. (btw, cl-perec enforces
this philosophy on an even more fine-grained level for all the data
types (or at least it should). it has the actual type information of
the receiving column, not just the type of the value that is to be
written, and errors *at storing* if the value is going to be distorted
by the db).

which is along the line with my thinking: by default report
potentially surprising behavior as early as possible (but leave some
ways to acknowledge the issue, once the decision has been made). iow,
fail early.


> Well, what I'm afraid of is 3) the user has been happily running a
> system on top of CL-Postgres, upgrades, and suddenly finds his system
> crashing. That's a bad thing, no?


not in my world. i know i'm radical with this way of thinking, but if
user (who is a programmer here!) is not ready for an upgrade, then
they simply shouldn't upgrade. i have countless repos subscribed in my
feed reader, so i get notified of the changes even before pulling
them. incompatible changes are inevitable and DVCS' make it as easy to
deal with them as never before. i had some patches even in postmodern
itself that i didn't pull to the live system for quite a while.

and what you call "crashing" in my reading means that after the
upgrade running the test suite stops with a descriptive error message,
even showing the context... now, if people have no test suites at all,
then no form of backward compatibility can save them.

this kind of "crashing" is a lot much better than getting a mail half
a year later, which, after a few days investigation, leads to the
realization that your government transferred the wrong amount of money
to 3200 municipalities for half a year... :)

it didn't happen, because we catch it in the test phase of a new
project (or we didn't get that mail yet... :) but still, you get the
point.

anyways, this is just one opinion, but i hope gives some insight why i
argue for this behavior.

-- 
 attila




More information about the postmodern-devel mailing list