Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 18 22:16

    dtolnay on gh-pages

    Deploy rust-lang/api-guidelines… (compare)

  • Feb 14 18:35
    jsgf commented #176
  • Feb 14 18:34
    jsgf commented #176
  • Feb 14 09:35
    grncdr commented #176
  • Feb 11 22:06

    dtolnay on gh-pages

    Deploy rust-lang/api-guidelines… (compare)

  • Feb 04 22:18

    dtolnay on gh-pages

    Deploy rust-lang/api-guidelines… (compare)

  • Jan 28 22:15

    dtolnay on gh-pages

    Deploy rust-lang/api-guidelines… (compare)

  • Jan 24 15:59
    jonas-schievink commented #131
  • Jan 24 15:58
    jonas-schievink commented #173
  • Jan 22 21:44
    ultrasaurus opened #215
  • Jan 21 22:28

    dtolnay on gh-pages

    Deploy rust-lang/api-guidelines… (compare)

  • Jan 19 02:08

    dtolnay on gh-pages

    Deploy rust-lang/api-guidelines… (compare)

  • Jan 19 02:07

    dtolnay on master

    necessities.md: complete licens… Merge pull request #214 from wa… (compare)

  • Jan 19 02:07
    dtolnay closed #214
  • Jan 19 02:05

    dtolnay on gh-pages

    Deploy rust-lang/api-guidelines… (compare)

  • Jan 19 02:03

    dtolnay on master

    CONTRIBUTING.md: use context li… Merge pull request #213 from wa… (compare)

  • Jan 19 02:03
    dtolnay closed #213
  • Jan 18 11:28
    waldyrious opened #214
  • Jan 18 11:12
    waldyrious edited #213
  • Jan 18 11:11
    waldyrious opened #213
David Tolnay
@dtolnay
Jake Goulding
@shepmaster
Is that different from the one in the header?
David Tolnay
@dtolnay
oh interesting
it is the same document but with a different url
i updated the one in the header
QuietMisdreavus
@QuietMisdreavus
changing the title (the first line) of the document changes its url
Aaron Turon
@aturon
@dtolnay i hope to pitch in on this effort too — if there’s any place where you think i could be particularly helpful, please let me know
David Tolnay
@dtolnay
thanks @aturon, the most valuable would be if you can weigh in on some of the "soliciting opinions" issues https://github.com/rust-lang-nursery/api-guidelines/issues?q=is%3Aissue+is%3Aopen+label%3A%22soliciting+opinions%22
Aaron Turon
@aturon
cool! will do
CrLF0710
@crlf0710

Hi, not sure if this is a proper place to ask, but i'm looking for some "insight"s and guidelines of the trait system.

What kind of roles should traits play? I've seen adjectives "Sized", nouns "Future" "Sync", verbs "Send" "Convert" "Borrow", prepositions "From" "To" "AsRef". Not to say some people are even abusing trait inheritance trying to build type taxonomy using trait inheritance. Are traits truly neutral to these usages? Or should there be some guidelines for when and how?

David Tolnay
@dtolnay
great question @crlf0710
we have been trying to figure this out in rust-lang-nursery/api-guidelines#28
i would prefer not to be prescriptive about what you are allowed to use traits for
rather, maybe the guideline should list the various grammar categories with examples, and recommend using the one that has traits most similar to your trait
CrLF0710
@crlf0710
@dtolnay great, thanks. i'll try to summarize some current usages under #28.
CrLF0710
@crlf0710
i've opened pr rust-lang-nursery/api-guidelines#126. Let me know if anything's inappropriate or missing!
Aaron Turon
@aturon
@dtolnay hey — just wanted to check in on this WG in general; how are things looking?
Eduardo Pinho
@Enet4
Good day! I am currently facing a small method naming dilemma.
I have a constructor method for type Foo which uses a Bar, but also returns a Baz alongside the Foo (as in, a Result<(Foo, Baz)>). How should one name this method?
Eduardo Pinho
@Enet4
I mean, one would expect the prefix with_. But with_bar_and_baz is misleading, and with_bar_with_baz sounds crazy. I've been thinking about with_bar_plus_baz, but I'd certainly appreciate some opinions.
David Tolnay
@dtolnay
@Enet4 hmm, i haven't seen that sort of situation in my own code
but i found one example in the standard library https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html
which is a constructor for two types that are somehow related
in your case would it be possible to make this a module-level function rather than inside of impl Foo?
David Tolnay
@dtolnay
can you say more about what specific types are involved here? it's tricky to make a good recommendation about Foo and Bar in the abstract
Eduardo Pinho
@Enet4
@dtolnay It's for the nifti crate. Reading a .img file here should yield a header extension sequence followed by the actual volume data. https://docs.rs/nifti/0.3.1/nifti/volume/inmem/struct.InMemNiftiVolume.html#method.from_file_with_extensions
Admittedly, this might not make a good static method. And now I wonder whether it should be public, since I already have another data type which reads everything.