4 ms·
The problem is that all pages aren't written to the spec, they're written to work with implementations. When there's only one implementation (that authors care
by pornel 13y ago
The problem is that all pages aren't written to the spec, they're written to work with implementations.
When there's only one implementation (that authors care about), then every quirk, bug and accidental misfeature can be depended upon, and SQLite has plenty of those ("FLOATING POINT" parsed as "INT", magic of ROWID, the lax type system even more forgiving than PHP, etc.)
If there was another implementation then lack of overlap in quirks/bugs would prevent authors from depending on them (e.g. if you wrote something stupid then it'd work in one browser, but not the other).
ASCII venn diagram of 2 implementations:
{ bugs1 ( usable standard } bugs2 )
ASCII venn diagram of all browsers just shipping same Sqlite:
{( usable: standard and all bugs })
- nolanl 13y agoThat's a good point, and one I could have added to the post. There are bugs in Web SQL, but they're largely the same on both Chrome and Safari. IndexedDB is trickier, because the bugs are all different between Firefox, IE, and Chrome. Again, another situation where libraries can help out. Although in general, it's sad that the "independent implementations" mantra basically guarantees a lack of consistency across browsers. It's like we only have a choice between "pointing to a pile of C code" or ending up with a pile of browser bugs. Maybe the W3C could write acceptance tests to go alongside the specs.
- pcwalton 13y ago> Maybe the W3C could write acceptance tests to go alongside the specs. Like these? :) https://github.com/w3c/web-platform-tests https://github.com/w3c/web-platform-tests
- nolanl 13y agoHeh, I learned a thing about a thing! :) Curious to know how so many quirks slipped through, though. Maybe I should do a PR on the tests for bugs that the browser vendors might not know about, e.g. https://gist.github.com/nolanlawson/8330172 https://gist.github.com/nolanlawson/8330172.