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

Consider creating examples directories for JVM and Swift libraries #563

Open
thunderbiscuit opened this issue Jun 21, 2024 · 1 comment
Open

Comments

@thunderbiscuit
Copy link
Member

I was looking at some of those examples directories in Rust projects and it occurred to me that Kotlin libraries do that as well. After asking ChatGPT, it appears that Swift libraries also sometimes include those types of directories (they call them Samples instead? to be confirmed).

I wonder if this might be a better way to showcase how to use the library than the tests. Our current tests basically do work as examples and it's very much how we use them (they're full of print statements and complete workflows rather than simple tests of APIs).

Just a thought. We could also of course run the examples as part of our CI runs.

@ItoroD
Copy link
Contributor

ItoroD commented Jun 21, 2024

I think its a great idea to have examples. Having examples also gives room to explain what we are trying to show (via comments) and gives a direct place for a user to go and look at how to use stuff.

Call me Flintstone, but tests aren't the first place I go to to check out how to use a lib.

@thunderbiscuit thunderbiscuit changed the title Consider creating examples and Samples directories for JVM and Swift libraries Consider creating examples directories for JVM and Swift libraries Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants