||[Jan. 28th, 2013|01:34 pm]
I was mystified for a lot longer than I feel I should have been as to why
var sql = [
["INSERT INTO SOME PLAUSIBLE SQL WITH A PARAMETER LIKE $1;", [JSON.stringify(state)]]
[["BEGIN TRANSACTION"], undefined]
I feel like this says something about human perception or cognition or something.
Missing comma? (Is this JS? What does JS do when you juxtapose lists?)
yup. there's no type error involved in taking the "COMMIT" field of an array object that doesn't have it. Just silent failcess and an undefined value.
why yes of course i meant to take the COMMITth element of this array what else could i have meant
... oh. I think I get at best partial credit, for not realizing how it was going to parse that. Duh.
the point is, it's not parsed as juxtaposed lists, but as an array index expression.
2013-01-30 07:49 am (UTC)
I wonder if any work has been put into making language syntax that is more resistant to errors like this. Didn't they supposedly do that with lojban? If it can be done with human languages it can surely be done with machine languages...