My mum went to a purpose-built 60s comprehensive - Elliot in Roehampton, which I believe a certain William Bevan attended some decades later - which did pretty well by her, as a bookish, intellectually curious girl from a "decent" working class family.
One thing worth noting, though: the intake at the school was streamed. Even though the three streams shared the same buildings and facilities, were taught by some of the same teachers, and presumably mingled to some degree outside of the classroom, the system was still structured so that at age 11 you were assigned to a stream and by and large the expectation was that you would stay in that stream all the way through.
My mum's view, IIRC, was that this worked well for the upper stream, which was pushed harder academically, and for the lower stream, which got a certain amount of special attention. Ironically, considering the usual assumption that comprehensive education caters best for some undifferentiated mass of "average" pupils, it was the middle stream that tended to coast along.
Later on came the movement for "mixed-ability" classrooms, and for teaching methods appropriate to groups representing diverse stages of educational development and achievement. My gut feeling is that this is fantastically difficult to do well, although my dad taught in a very small primary school with only two classes, infant and junior, and of necessity had to teach in this sort of way.
If I had to design a school system to be implemented tomorrow, it would be comprehensive but open to streaming and setting as social and pedagogical requirements dictated - mixed-ability teaching would be encouraged where there was a good chance of its being done well, but not imposed where there was not. Teacher training would include critical pedagogy, and would continue past the diploma in the form of continuous formal and semi-formal education and critical reflection.
I would permit home education, and small independent faith-group (or unorthodox-pedagogical-experimentation group) education, but encourage the use of school facilities by such independent educators, and impose some (fairly minimal) legal requirements concerning curriculum. I would integrate the private system into the state system by making all private schools grant-maintained, limiting the grant available per pupil to that available to pupils in the existing state sector. I would however permit such schools a degree of independence from state control, but impose financial penalties for significant disparities in intake (measured by free school meals, for example).
Sex education would be subsumed under a more general training in ethics, citizenship and the care of the self: the curriculum would cover issues like assertiveness and depression, the effects on mood and behaviour of oxytocin, the use of contraceptives, sex work, eating disorders, homophobia and its sibling phobias, the cultural history of erotic representation and the reasons why so few rape prosecutions are successful.
At the high level, the overarching aim of my system would be to minimise institutionalised social segregation, whether by "ability" or by parental income, while permitting the development within the system of shared communities of practice: by all means let pupils with a common notion of what they need to learn and how be enabled to draw together and empowered to pursue that end collectively.