Click here to Skip to main content
15,891,675 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 9:21
mvahoney the codewitch2-Jul-21 9:21 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Greg Utas2-Jul-21 9:35
professionalGreg Utas2-Jul-21 9:35 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 9:48
mvahoney the codewitch2-Jul-21 9:48 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Super Lloyd2-Jul-21 15:53
Super Lloyd2-Jul-21 15:53 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 16:13
mvahoney the codewitch2-Jul-21 16:13 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Super Lloyd2-Jul-21 16:31
Super Lloyd2-Jul-21 16:31 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 16:32
mvahoney the codewitch2-Jul-21 16:32 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Stefan_Lang4-Jul-21 23:28
Stefan_Lang4-Jul-21 23: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 1:44
mvahoney the codewitch5-Jul-21 1:44 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Stefan_Lang6-Jul-21 1:23
Stefan_Lang6-Jul-21 1:23 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch6-Jul-21 3:29
mvahoney the codewitch6-Jul-21 3:29 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Stefan_Lang6-Jul-21 6:28
Stefan_Lang6-Jul-21 6:28 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Stefan_Lang6-Jul-21 6:30
Stefan_Lang6-Jul-21 6:30 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Greg Utas2-Jul-21 10:03
professionalGreg Utas2-Jul-21 10:03 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 10:12
mvahoney the codewitch2-Jul-21 10:12 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Super Lloyd2-Jul-21 15:56
Super Lloyd2-Jul-21 15:56 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 16:17
mvahoney the codewitch2-Jul-21 16:17 
GeneralRe: First time I've ever felt bad for rolling my own Pin
Super Lloyd2-Jul-21 16:29
Super Lloyd2-Jul-21 16:29 
GeneralRe: First time I've ever felt bad for rolling my own Pin
honey the codewitch2-Jul-21 16:31
mvahoney the codewitch2-Jul-21 16:31 
GeneralField of Dreams...? Pin
Solveering LLC2-Jul-21 5:08
Solveering LLC2-Jul-21 5:08 
GeneralRe: Field of Dreams...? Pin
W Balboos, GHB2-Jul-21 5:24
W Balboos, GHB2-Jul-21 5:24 
GeneralRe: Field of Dreams...? Pin
DRHuff2-Jul-21 7:04
DRHuff2-Jul-21 7:04 
GeneralRe: Field of Dreams...? Pin
PIEBALDconsult2-Jul-21 9:04
mvePIEBALDconsult2-Jul-21 9:04 
GeneralRe: Field of Dreams...? Pin
Solveering LLC2-Jul-21 9:21
Solveering LLC2-Jul-21 9:21 
GeneralRe: Field of Dreams...? Pin
PIEBALDconsult2-Jul-21 9:22
mvePIEBALDconsult2-Jul-21 9: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.