←back to thread

480 points jedeusus | 1 comments | | HN request time: 0.224s | source
Show context
dennis-tra ◴[] No.43545831[source]
Can someone explain to me why the compiler can’t do struct-field-alignment? This feels like something that can easily be automated.
replies(3): >>43545865 #>>43549815 #>>43554401 #
1. masklinn ◴[] No.43554401[source]
It can. Rust does.

That requires a way to opt out tho, because there are situations where you need a specific field ordering, so now the langage needs to provide way to tune struct compilation behaviour.