[swift-evolution] [swift-build-dev] [Review] SE-0158 Package Manager Manifest API Redesign
David Sweeris
davesweeris at mac.com
Thu Mar 9 16:05:57 CST 2017
> On Mar 8, 2017, at 22:34, Ankit Aggarwal <ankit_aggarwal at apple.com> wrote:
>
>
>> +1, although I don’t know why we're supporting this:
>> // 1.5.8 ..< 2.0.0
>> .package(url: "/SwiftyJSON", from: "1.5.8"),
>> when, at least as far as I can tell, this:
>> // 1.5.8 ..< 2.0.0
>> .package(url: "/SwiftyJSON", .uptoNextMajor("1.5.8")),
>> does the same thing, and the spelling is, at least to me, clearer as well. Dunno, maybe the “from” version is a term of art that I’m just not familiar with.
>
> Hi David,
>
> Thank you for the review.
>
> It is true that `from` and `.uptoNextMajor` are exactly same. We think that the most widely used requirement will be `.uptoNextMajor`, so we wanted to provide a shorthand for it.
Ok, I just wanted to make sure having both spellings was intentional. I've been trying to think of a shorthand that's clearer, but haven't really come up with anything.
Seems like we're fighting English's grammar... With the non-shorthand spelling, the "normal" way to write that would have the version first, followed by the modifier. Adapted to pseudo-code, it would be `1.5.8.uptoNextMajor()`, which Swift currently can't support. And "from" is typically followed by "to" or "through", which makes the shorthand kinda odd as well.
Sorry, I should've noticed this during the discussion thread. Since this the review thread, though, I want to make it clear that I'm still +1, and think this spelling issue (to the extent that it is one) isn't worth derailing the proposal.
- Dave Sweeris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170309/75fc8279/attachment.html>
More information about the swift-evolution
mailing list