Click here to Skip to main content
15,166,587 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralFirst time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 10:21
mvahoney the codewitch2-Jul-21 10:21 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Greg Utas2-Jul-21 10:35
mveGreg Utas2-Jul-21 10:35 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 10:48
mvahoney the codewitch2-Jul-21 10:48 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Super Lloyd2-Jul-21 16:53
MemberSuper Lloyd2-Jul-21 16:53 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 17:13
mvahoney the codewitch2-Jul-21 17:13 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Super Lloyd2-Jul-21 17:31
MemberSuper Lloyd2-Jul-21 17:31 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 17:32
mvahoney the codewitch2-Jul-21 17:32 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Stefan_Lang5-Jul-21 0:28
mveStefan_Lang5-Jul-21 0:28 
Quote:
why everyone doesn't just make C++ libs as pure HPP files is beyond me. The extra build complexity is not worth the little bit of extra code hiding you can get by using cpp files. With an HPP you just include the heckin thing.

There are a lot more reasons to not put implementations into header files than just hiding proprietary code: reducing dependencies, making code more readable and more maintainable, reducing build time.

You may not be able to appreciate any of this as long as you work on your own and your projects are small. But I assure you that it's well worth the effort for any project with a lifetime of more than 1 year, even if you're the only one maintaining it. And most certainly for any team project.

For example I currently work in plugin development, and our framework to help us create a plugin makes heavy use of templates, so it's header-only. However, these templates force the compiler to pull in pretty much the entire codebase as well as several large third party libraries such as boost, increasing the build time to more than a minute, whereas a simple plugin not using that framework can be built in a second.

It's so bad that I'm currently looking into replacing that framework with a different approach that minimizes dependencies (and therefore build-time). The key concept will be moving all the code that depends on third party libraries into cpp files and putting those into a pre-built library. Building the plugin will then no longer require pulling in hundreds of headers from third party libraries!
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch5-Jul-21 2:44
mvahoney the codewitch5-Jul-21 2:44 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Stefan_Lang6-Jul-21 2:23
mveStefan_Lang6-Jul-21 2:23 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch6-Jul-21 4:29
mvahoney the codewitch6-Jul-21 4:29 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Stefan_Lang6-Jul-21 7:28
mveStefan_Lang6-Jul-21 7:28 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Stefan_Lang6-Jul-21 7:30
mveStefan_Lang6-Jul-21 7:30 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Greg Utas2-Jul-21 11:03
mveGreg Utas2-Jul-21 11:03 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 11:12
mvahoney the codewitch2-Jul-21 11:12 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Super Lloyd2-Jul-21 16:56
MemberSuper Lloyd2-Jul-21 16:56 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 17:17
mvahoney the codewitch2-Jul-21 17:17 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Super Lloyd2-Jul-21 17:29
MemberSuper Lloyd2-Jul-21 17:29 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 17:31
mvahoney the codewitch2-Jul-21 17:31 
GeneralField of Dreams...? Pin
Solveering LLC2-Jul-21 6:08
MemberSolveering LLC2-Jul-21 6:08 
GeneralRe: Field of Dreams...? Pin
W Balboos, GHB2-Jul-21 6:24
mveW Balboos, GHB2-Jul-21 6:24 
GeneralRe: Field of Dreams...? Pin
DRHuff2-Jul-21 8:04
MemberDRHuff2-Jul-21 8:04 
GeneralRe: Field of Dreams...? Pin
PIEBALDconsult2-Jul-21 10:04
professionalPIEBALDconsult2-Jul-21 10:04 
GeneralRe: Field of Dreams...? Pin
Solveering LLC2-Jul-21 10:21
MemberSolveering LLC2-Jul-21 10:21 
GeneralRe: Field of Dreams...? Pin
PIEBALDconsult2-Jul-21 10:22
professionalPIEBALDconsult2-Jul-21 10:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.