Uh oh!
There was an error while loading. Please reload this page.
RFC: enforce module directory structure more strictly - #63
Conversation
pnkfelix
commented
May 1, 2014
@nikomatsakis has a more general idea on how to fix the common problems here. He should probably weigh in (or Niko: if you prefer, I can write an RFC for your proposal). |
nikomatsakis
commented
May 1, 2014
@pnkfelix this is basically the "opinionated" version of what I wanted to do. The less opinionated version would support either the mod.rs or else a pattern where the main module is "foo.rs" and submodules are "foo/bar.rs" The lenient and strict version are basically the same, except for the behaviour when the current file name is not mod.rs. In that case, the lenient version would, given a declaration |
o11c
commented
May 1, 2014
More choices in things like this are bad. |
pcwalton
commented
May 1, 2014
This seems reasonable to me at first glance. |
alexcrichton
commented
May 1, 2014
I also think this seems like a reasonable solution to a common problem. |
pnkfelix
commented
May 1, 2014
i prefer @nikomatsakis 's generalized form, but I would not object to accepting this RFC, especially since I believe it to be forward-compatible with niko's generalization. |
nikomatsakis
commented
May 1, 2014
@chris-morgan I took the liberty of updating the title to be more precise and formal. Feel free to update it again if you don't think it correctly reflects your proposal. |
chris-morgan
commented
May 1, 2014
@nikomatsakis the rename is fine. I wasn't enthralled with the name it had! As for the alternative of allowing It's much easier for a tool to correct style if there is one, and only one, way of doing something. |
bstrie
commented
May 6, 2014
+1 to more restrictions to make the module system clearer. |
emberian
commented
May 13, 2014
Strong +1 |
alexcrichton
commented
May 13, 2014
We discussed this at today's meeting, and have decided to merge this. |
pnkfelix
commented
Jun 3, 2014
Just a quick note of something I've noticed since attempting to adopt the stricter style imposed here: it can yield many open buffers that are all named A good editor/IDE will distinguish them in some way, e.g by using the directory that they fall in (so that the buffers are named things like Nonetheless, the slightly looser semantic that Niko was proposing (which we could still add on top of this, I believe) would enable me to avoid ever using the same filename, which can ease switching between open buffers in some editors. |
nikomatsakis
commented
Jun 3, 2014
@pnkfelix yeah, this has been mentioned a few times. I can't believe that there are editors out there that fail to make the distinction between files with the same name in distinct directories, but apparently it is true. (Hello, people, |
chris-morgan
commented
Jun 4, 2014
Another possibility is |
This commits adds a `poll_cancel` method to learn about when the `Oneshot` half of a complete/oneshot pair has gone away. This can then be used to detect when a computation is no longer wanted. Closesrust-lang#63
No description provided.