-
Notifications
You must be signed in to change notification settings - Fork 18
Proposals for naming and package structure #24
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
Comments
The triple negation was very hard for me too read, and I understood it the wrong way the first two times I read the sentence. Perhaps consider: -Names that will not exist in a future Scala release MUST NOT be outside of a next (sub-)package.
+Names that will not exist in a future Scala release MUST be inside of a next (sub-)package. |
I don't know why that slipped by me. yes, fixed |
@NthPortal How should the object holding the value class be named? Just |
IMO, it can go directly in the package object. |
@NthPortal so importing |
correct. and if you wanted to import just one, you'd import |
Having to import next.something would mean that cross-building 3.0/3.1 won't be possible unless we ship this with empty next instances for 3.1. that'd be lame. |
then just import |
would |
Then you'd still need to ship a version with an empty next package for 3.1. which means inflicting the transitive dependency on your dependents. That can be sort of worked around with people taking a provided dependency for 3.1. |
I think that shipping empty Anyway, they probably won't stay empty as we then start adding new stuff coming in 3.2 or later. |
Julien suggested on #25 that there wouldn't be 3.2 stuff in this library. Per version |
I've noticed we still have a shadowing problem for names which appear in multiple packages (e.g. |
Did you come to a conclusion about this? So I could update #23 and open a follow up for |
Vote by reacting to this comment (see the following comment for more granular votes) In favour of (👍) or against (👎) proposal 1 in its entirety In favour of (🚀) or agains (👀) proposal 2 in its entirety |
Granular votes (by reacting): In favour of proposals 1 and 1a but against 1b (👀) |
This all looks good, except I don't know what I think about 1b. What are the pros and cons there? |
I'll give an example of something that 1b affects. Currently, If we were to reject 1b and add As I see it, Pros: simplicity Cons: reduces the total set of possible changes/fixes/improvements |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
follow-up at #46 |
I propose that we don't wait on finalizing this and #46 to merge PRs, and we can just refactor the library once we've decided on those. |
Proposals:
next
(sub-)package. Names that will not exist in a future Scala release MUST be in anext
(sub-)package.a. Corollary: Extension methods MUST go in
next
(sub-)packages.b. Possible extension: All names that are planned to exist in a future Scala release MUST be outside of
next
(sub-)packages.Next<Name>Extensions
, where<Name>
is the name of the type.a. For example, extension methods for
LazyList
would go in value class namedNextLazyListExtensions
.b. Extension method value classes for an object that is a companion SHOULD be named
Next<Name>CompanionExtensions
.c. Extension method value classes for general collection types (e.g.
Map
,Set
) should have have a prefix to<Name>
that is the first letter of each package segment (e.g.NextSCISetExtensions
forscala.collection.immutable.Set
)Something something RFC 2119
The text was updated successfully, but these errors were encountered: