On Wed, Nov 02, 2005 at 10:45:54AM -0600, Jay Sprenkle wrote:
> Subject: Re: [sqlite] Proposed 3.3.0 changes. Was: 5/2==2

> > So don't make the field 10 bytes long, make it only 8.  SQLite won't
> > care a bit, and will give you the value in whatever format you want.
> 
> Then it's not type agnostic any more. You now have an 8 byte numeric
> and a 10 byte numeric. Which is no different than integer and real.

Wrong, and obviously so.  I mean really, how many bytes LONG a value
is must DETERMINE whether it represents an integer or a floating point
number?  Must?  In what bizarre alternate universe is that true?

> > From SQLite's standpoint it is agnostic.  SQLite neither knows nor cares
> > what is actually stored in the column; that's up to your application to

> The only way for this to work will be to remove all mathematic
> operations.  You can't make it agnostic of types if you have more
> than one type and allow operations to be performed on the types.

Again wrong.

(Note that deciding to do math on values, even if you do it via the
"+" operator in a SQL query, *IS* part of the application.  It's
certainly not part of the data storage layer, at any rate.)

Jay, it's painful to see you put your foot in your mouth over and over
again.  Please learn enough so that you stop sticking it in there.

E.g., Tcl can be reasonably described as type agnostic, yet it can do
math.  Since DRH is also a member of the Tcl Core Team, presumably Tcl
was a design influence on SQLite.  It might be useful to look at it
for comparison.

In Tcl, each function decides how to interpret its arguments, whether
as integers, strings, floats, or whatever.  But the Tcl runtime
storing, copying, or doing whatever else with those values basically
does NOT care about their "type".  You can assign any value to any
variable, etc.  Thus it makes sense to describe Tcl as "type
agnostic".  That seems to have certain parallels to SQLite's manifest
typing.

-- 
Andrew Piskorski <[EMAIL PROTECTED]>
http://www.piskorski.com/

Reply via email to