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

Examples that involve non-standard libraries #19

Open
KrisSiegel opened this issue Apr 7, 2015 · 5 comments
Open

Examples that involve non-standard libraries #19

KrisSiegel opened this issue Apr 7, 2015 · 5 comments
Labels

Comments

@KrisSiegel
Copy link

Is the goal of this website to provide examples only for standard libraries or will it branch out to non-standard? The reason I ask is it's been 10 years since I've done C++ work and these examples are really awesome but when I look for examples that, say, use TCP/IP it's almost impossible to find good, modern libraries and coding techniques.

If there is interest in this I may try to provide some PRs in the interest of my own personal learning :)

@sftrabbit
Copy link
Owner

I am undecided on this at the moment. It had originally been my plan to have a category of samples which were just examples of using libraries. I had two thoughts against it though:

  1. There are way too many libraries out there. How could C++ Samples be the go-to resource for them all? Isn't it better for the library maintainers to provide their own documentation?
  2. It would require some extra work to integrate this with the current site build process (as testing the samples will required having the appropriate libraries available).

Further thoughts are appreciated though!

@KrisSiegel
Copy link
Author

Yeah I understand including samples with external libraries is a bit of a slippery slope. It probably makes sense to not do those at all otherwise if this web site is popular enough everyone is going to want samples for their library to be on it. At the same time there is a real need for good samples for popular libraries because many of them rarely even use C++ 11 features where they could.

I wonder if a good middle ground may be proving an area where only C++ / STL features are shown off and another area where users can simply submit / publish their own. I mean it kinda duplicates Gist in terms of capabilities but it's also nice to have a central repository.

Not sure if that's a good idea or a horrible idea.

At least for TCP/IP perhaps coverage of that should be handled using the standard networking library currently being proposed for C++ 17 / C++ 1z.

@sftrabbit
Copy link
Owner

I quite like the idea. Perhaps even just a page on the site that lists gists that people submit. That might be interesting (but could easily become cluttered). I'll have to think some more about this.

@KrisSiegel
Copy link
Author

That sounds good. Thanks!

@mauve
Copy link

mauve commented Feb 17, 2017

I think introducing external libraries would be wise. Look for example at http://www.cppsamples.com/patterns/observer.html which doesn't handle lifetime of the "connection". This usually works for GC languages but is a really huge problem in C++. In Boost.Signals2 and Sigc++ have this as one of the core features.

Therefore I think using external libraries should probably be the default for some usecases even.

I can whip up a PR if/when we agree.

All the best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants