247 karma · joined April 13, 2021
It’s supposed to break even. It’s supposed to be a service that provides value. If it isn’t providing value, it loses its reason to exist.
You can argue that the consumer captures a lot of surplus value from the postal service. But it doesn’t exist just to please people who like public programs.
The same with libraries.
That doesn’t matter.
> This breaks down with mutation, especially atomics, which are allowed as struct fields.
Not true at all. First, the compiler could refrain from doing this sort of code generation on fields with atomics (or any kind of mutable cell). Second, the object could be misaligned in some local contexts sometimes but references passed to functions could be always properly aligned. So a RefCell or atomic could still be copied or moved out and mutated, then moved back in, when the object is known not to have any references.
In general, this is close to reasonable code generation — a local struct could have some of its parts in registers. Its parts might be in noncontiguous stack locations. A language spec needs to specify that a field can be referenced or accessed via its pointer. It might also distinguish this from an alignment guarantee.
With something like CockroachDB or TiDB I can easily say yes to that. The value proposition is clear.
I think Dgraph's DQL is a worse interface than SQL; there are some aspects of it that give me the heebie-jeebies.