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

Separate declarations from implementations #4

Closed
severin-lemaignan opened this issue Sep 18, 2013 · 1 comment
Closed

Separate declarations from implementations #4

severin-lemaignan opened this issue Sep 18, 2013 · 1 comment

Comments

@severin-lemaignan
Copy link

Currently, the bootstrap projects include the class declarations in the implementation.

Is there any good reason not to provide separate headers (which are needed as soon as the project grows up)?

I can submit a pull request for that, if needed.

@mosra
Copy link
Owner

mosra commented Sep 18, 2013

Good point, thanks. Actually it was originally done this way, but later I decided to use headers only when they are really needed (in particular, included by more than one source file). In my opinion this is similar to main() function -- the source file commonly doesn't have any corresponding header, because main() shouldn't be used in any other way than as an application entry point. This approach is used for "main" classes in all examples and other projects and also in all unit tests. On the other hand, classes other than the main one always have their declaration in separate header file.

There surely might be some reasons why to not go with this approach, I chose it mainly for its simplicity.

@mosra mosra closed this as completed Aug 16, 2016
@mosra mosra added this to the 2013.10 milestone Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants