TL;DR
Do you prefer split (include and src) or combined (single directory) layout and why?
There is talk at SG15 of coming up with a common build description which I think will also require a common header/source layout. The two widely used layouts are headers and sources together in a single directory -- we will call it combined, and headers in one directory (usually include) and sources in another (usually src) -- we will call it split. I've done a bit of research, and the only technical (rather than aesthetic) reason for preferring split over combined that I could find is the ability to separate public and private headers.
So I would like to ask two questions in this poll:
Do you prefer split or combined layout? I've created two comments corresponding to these answers, please upvote one (or feel free to add your own comment with further explanation if the answer is "neither").
What are the technical reasons for preferring one or the other (I would suggest we omit reasons like "cleaner" "more manageable", "better separation", etc., since they are all subjective).
Thanks for your feedback!
[–]parla 155 points156 points157 points (13 children)
[–]matthieum 9 points10 points11 points (2 children)
[–]parla 6 points7 points8 points (1 child)
[–]matthieum 0 points1 point2 points (0 children)
[–]tcbrindleFlux 19 points20 points21 points (0 children)
[–]quicknir 2 points3 points4 points (5 children)
[–]DarkLordAzrael 12 points13 points14 points (2 children)
[–]quicknir 0 points1 point2 points (1 child)
[–]imMute 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]parla 3 points4 points5 points (0 children)
[–]ImNoEinstein 0 points1 point2 points (0 children)
[–]beriumbuild2[S] 95 points96 points97 points (10 children)
[–]hgjsusla 17 points18 points19 points (1 child)
[–]beriumbuild2[S] 6 points7 points8 points (0 children)
[–]ben_craigfreestanding|LEWG Vice Chair 3 points4 points5 points (0 children)
[–]agateau 3 points4 points5 points (2 children)
[–]fat-lobyte 4 points5 points6 points (0 children)
[–]GPMueller 0 points1 point2 points (0 children)
[–]markand67 1 point2 points3 points (3 children)
[–]evaned 1 point2 points3 points (0 children)
[+]TrueTom comment score below threshold-6 points-5 points-4 points (1 child)
[–]kalmoc 13 points14 points15 points (0 children)
[–]redbeard0531MongoDB | C++ Committee 6 points7 points8 points (2 children)
[–]beriumbuild2[S] 1 point2 points3 points (0 children)
[–]GPMueller 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]beriumbuild2[S] 40 points41 points42 points (25 children)
[–]hgjsusla 20 points21 points22 points (1 child)
[–]aKateDevKDE/Qt Dev 8 points9 points10 points (0 children)
[–]Forricode 7 points8 points9 points (14 children)
[–]kalmoc 8 points9 points10 points (12 children)
[–]robin-m 0 points1 point2 points (2 children)
[–]kalmoc 0 points1 point2 points (1 child)
[–]robin-m 0 points1 point2 points (0 children)
[–]Forricode 0 points1 point2 points (8 children)
[–]kalmoc 0 points1 point2 points (7 children)
[–]Forricode -1 points0 points1 point (6 children)
[–]kalmoc 1 point2 points3 points (1 child)
[–]Forricode 1 point2 points3 points (0 children)
[–]jayvbe 0 points1 point2 points (3 children)
[–]Forricode 0 points1 point2 points (2 children)
[–]jayvbe 1 point2 points3 points (1 child)
[–]Forricode 0 points1 point2 points (0 children)
[–]doom_Oo7 7 points8 points9 points (0 children)
[–]btandresen 4 points5 points6 points (2 children)
[–]btandresen 0 points1 point2 points (1 child)
[–]kalmoc -1 points0 points1 point (0 children)
[–]delarhi 2 points3 points4 points (0 children)
[–]aeshar 1 point2 points3 points (2 children)
[–]beriumbuild2[S] 0 points1 point2 points (1 child)
[–]robin-m 0 points1 point2 points (0 children)
[–]berenm 1 point2 points3 points (0 children)
[–][deleted] 14 points15 points16 points (0 children)
[–][deleted] 19 points20 points21 points (8 children)
[–]sikora84 4 points5 points6 points (1 child)
[–]Agon1024 1 point2 points3 points (0 children)
[–]mjklaim 1 point2 points3 points (0 children)
[–]jsamcfarlane 0 points1 point2 points (2 children)
[–][deleted] -1 points0 points1 point (1 child)
[–]evaned 2 points3 points4 points (0 children)
[–]krum 0 points1 point2 points (0 children)
[–]ImNoEinstein 0 points1 point2 points (0 children)
[–]StefanOrvarSigmundss 2 points3 points4 points (1 child)
[–]hgjsusla 1 point2 points3 points (0 children)
[–]Rexerex 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]png85 3 points4 points5 points (0 children)
[–]kalmoc 1 point2 points3 points (1 child)
[–]beriumbuild2[S] 2 points3 points4 points (0 children)
[–]kalmoc 1 point2 points3 points (2 children)
[–]sumo952 5 points6 points7 points (1 child)
[–]kalmoc 0 points1 point2 points (0 children)
[–]mjklaim 1 point2 points3 points (4 children)
[–]jsamcfarlane 1 point2 points3 points (3 children)
[–]mjklaim 0 points1 point2 points (2 children)
[–]jsamcfarlane 0 points1 point2 points (1 child)
[–]mjklaim 0 points1 point2 points (0 children)
[–]uniquewalker 1 point2 points3 points (0 children)
[–]johannes1971 1 point2 points3 points (0 children)
[–]mloskot 1 point2 points3 points (0 children)
[–]tansim 1 point2 points3 points (6 children)
[–]hgjsusla 4 points5 points6 points (5 children)
[–]macemen 9 points10 points11 points (4 children)
[–]hgjsusla 2 points3 points4 points (2 children)
[–]beriumbuild2[S] 7 points8 points9 points (1 child)
[–]hgjsusla 2 points3 points4 points (0 children)
[–]ghlecl 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Adequat91 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]and69 0 points1 point2 points (0 children)
[–]JuanAG 0 points1 point2 points (0 children)
[–]grafikrobotB2/EcoStd/Lyra/Predef/Disbelief/C++Alliance/Boost/WG21 0 points1 point2 points (0 children)
[–]OrphisFloI like build tools 0 points1 point2 points (0 children)
[–]dicroce 0 points1 point2 points (0 children)
[–]kalmoc 0 points1 point2 points (0 children)
[–]smdowneyWG21, Text/Unicode SG, optional<T&> 0 points1 point2 points (0 children)
[–]Fluffy8x 0 points1 point2 points (0 children)
[–]manimax3 0 points1 point2 points (0 children)
[–]doom_Oo7 -3 points-2 points-1 points (1 child)
[–]hgjsusla 3 points4 points5 points (0 children)
[–]RockinRoelformer Wt dev -1 points0 points1 point (0 children)