You'll know that I'm not overly impressed by the wiring in Sweden, but in this case I think Sweden is a leader and that the rest of the world should follow.
A plug and socket system for ceiling lamps was introduced in 1915! It has been in use ever since, although today it is polarised and grounded.
When mounted there is a box behind (above) the socket, where the wiring is done. Even if you have to remove the socket to fit a luminaire that mounts flat onto the ceiling, you just have three wires. Simple and safe!