rust-unofficial/patterns

Inspiration for more patterns

killercup opened this issue ยท 10 comments

I recently started collecting some API design patterns here. I'm not sure if these match what this repo is all about (or which ones you already cover), but I just wanted to say: Feel free to take anything you like from that post! :)

  • Public type aliases
  • Use conversion traits
  • Laziness: Use Iterators
  • Laziness: Take closures
  • Custom traits for input parameters
  • Extension traits
  • Builder pattern
  • Session types

(The markdown source of that post is here and I hereby relicense the content as MPL2 (in addition to CC-BY) and allow you to use it in this repo.)

nrc commented

awesome, thanks!

Yeah, we don't want to overlap with the rust api guidelines (which is also linked in the killercup article).

Let's discuss each of those individually:

Should we close this in favour of #116 ? I copied everything needed from this issue over.

In that issue the fact that these issues should be taken from that blog post is not clear in my opinion.
Anyway I prefer smaller issues with respect to big ones, because it is impossible to follow too many discussions at the same time. Maybe that issue could link to this one? ๐Ÿ˜…

Agreed, discussions should still take place in smaller issues, it's an umbrella. i thought about opening an issue for each of the points in this issue actually. hence why i asked about closing. we could link from each of these issues to this one here to make clear, that there might be material taken from it

What you are suggesting is the opposite: too small issues ๐Ÿ˜‚
I propose to keep the sub-issues as checklist (see the second comment) and split the discussion in different issues if and when needed :)

Yeah, or even better use the discussion board for discussing how to write the patterns and keep the issues clean for actual issues, what do you think?

It depends for what you mean with "actual issues".

I think "discussions" are still in beta and they are more meant for "stack overflow" kind of random questions.
I wouldn't force users to use discussions over issues to express concerns about the content of this book.

Yeah, let's see how it develops.