Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split up binding.cc #542

Closed
vweevers opened this issue Dec 9, 2018 · 7 comments
Closed

Split up binding.cc #542

vweevers opened this issue Dec 9, 2018 · 7 comments
Labels
cleanup Housekeeping semver-patch Bug fixes that are backward compatible

Comments

@vweevers
Copy link
Member

vweevers commented Dec 9, 2018

TBD after #540 is merged.

@vweevers vweevers added the discussion Discussion label Dec 9, 2018
@vweevers vweevers mentioned this issue Dec 9, 2018
@ralphtheninja
Copy link
Member

I have no problem with splitting binding.cc into multiple parts. I propose something like:

$ tree src/
src/
├── batch.cc
├── batch.h
├── common.cc
├── common.h
├── database.cc
├── database.h
├── iterator.cc
├── iterator.h
├── main.cc
├── workers.cc
└── workers.h

0 directories, 11 files

@vweevers I also thought that maybe you could do this. It would be a good exercise for you to get some of that code into your head, so it's not only in mine. WDYT?

@ralphtheninja
Copy link
Member

Or maybe:

$ tree src/
src/
├── common.cc
├── common.h
├── context.cc
├── context.h
├── main.cc
├── workers.cc
└── workers.h

0 directories, 7 files

Where context.{h,cc} would contain Database, Iterator and Batch classes.

@ralphtheninja ralphtheninja changed the title Split up binding.cc? Split up binding.cc Dec 9, 2018
@vweevers
Copy link
Member Author

vweevers commented Dec 9, 2018

I also thought that maybe you could do this. It would be a good exercise for you to get some of that code into your head, so it's not only in mine. WDYT?

Sure! I'm open to it. No promises as to when, but that's fine, there's no rush on this.

@ralphtheninja
Copy link
Member

Came to think of it, common.{h,cc} might not even be needed if we do context.{h,cc}.

@vweevers
Copy link
Member Author

vweevers commented Dec 9, 2018

By "common" you mean the macros and helpers?

@ralphtheninja
Copy link
Member

By "common" you mean the macros and helpers?

Yeah, basically any code that needs to be shared between files. Macros and function signatures goes into the header file, function implementations in .cc.

@vweevers vweevers added cleanup Housekeeping and removed discussion Discussion labels Jan 1, 2019
@vweevers vweevers added the semver-patch Bug fixes that are backward compatible label Mar 31, 2019
@vweevers
Copy link
Member Author

I'm fine with the way it is now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Housekeeping semver-patch Bug fixes that are backward compatible
Projects
None yet
Development

No branches or pull requests

2 participants