realised that typescript breaks referential transparency due to the way it types...
jcoglan @jcoglan@mastodon.social
realised that typescript breaks referential transparency due to the way it types object literals, and I can't think of any way that JS does this. does anyone know of one?
i.e. in typescript, this:
let x = { a: 1 }
f(x)
is a meaningfully different program to:
f({ a: 1 })
this is not the case in JS and I can't think of any ways in which JS exhibits this problem