On 23.09.2012 12:37 CE(S)T, Baruch Burstein wrote:
> Has anyone ever actually taken advantage of this feature? In what case?

No. And I guess I wouldn't need it. If I need that in other systems, I
simply use the most generic type, varchar/text or blob. This way, at
least it's obvious that text can appear in a column. I don't see any use
in letting the data store accept arbitrary data types.

After all, some code must read and understand the data again! And code
is usually very restricted in what it can do with data. Some values must
be added/multiplied/..., others are concatenated. Each algorithm needs
certain data types, even if the programming language doesn't enforce
them. While you could always use a different data type at your will, you
have to live with the consequences of doing so: bugs and crashes.
Sometimes even unnoticed.

And if the data will not be processed by code, but simply stored for a
user to read it, a simple text column will always do.

I code C# and PHP a lot. C# has a mostly static type system and it has
the great benefit that the compiler can check the entire application
before you need to execute every line of it. PHP doesn't have that
advantage and I regularly produce and find bugs due to that. But also in
PHP, I carefully select the appropriate type (i.e. don't rely on
auto-conversion too much) and rely on it being preserved. That allows me
to add my own type-checking and find bugs a lot faster.

-- 
Yves Goergen - nospam.l...@unclassified.de - http://unclassified.de
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to