On Wed, Apr 29, 2015 at 9:33 PM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:
> Hi Walter, > > On Thu, Apr 30, 2015 at 11:52 AM, Walter Parker <walt...@gmail.com> wrote: > >> Are you asking to have both the 32 and 64 bit versions of PHP fully map >> to the type system in SQLite? The type system in SQLite appears to have >> been setup to map to programming language that lots of types (modern C, >> C++, maybe Java) rather than PHP. >> >> I think you might have an easier time fixing the SQLite adaptor for PHP >> than making both 32 and 64 bit PHP map to the type structure for SQLite >> completely transparently with full type defs. >> > > It's not a SQLite/etc access library issue, but the user code issue. > > Average PHP users will use int type hint for record IDs. This results in > fatal > error (or exception). These code does not have to be my/your code, but > other libraries written by someone else. > > Regards, > > -- > Yasuo Ohgaki > yohg...@ohgaki.net > Then this is exactly why we need type hints. If the average user is using 32 ints to map to 64 bit values, then someone has written broken code. The code should fail with a type check error, not be automagically fixed if you are using types. At some point the programmer should take responsibility for matching the DB API to the code base. Hiding mistakes only sets up the uninformed users for mistakes later. Mixing 32 bit code/sizes with 64 code/sizes requires that you pay some attention to sizes. Do everything in 32 bit, not a problem. Do everything in 64 bit, not a problem. Mix the two and there is a cost. As far as a I can tell, they is little desire in the current day to make the 32/64 hybrid modes easier/simpler. This is a fact that people will have live with (or do the work themselves). I see it as a legacy issue that is becoming more and more irrelevant. It would be nice to help, but it may setup future legacy issues that we would rather not support. Walter -- The greatest dangers to liberty lurk in insidious encroachment by men of zeal, well-meaning but without understanding. -- Justice Louis D. Brandeis