-1

I am not able to understand what is the difference between these two keywords in swift3?

If anyone has a link to a good article about this, please share.

Nikita P
  • 4,226
  • 5
  • 31
  • 55
  • 3
    `moduleprivate`, it appears, was under discussion but ultimately rejected. Please form your question in relation to the official spec, which has been accepted here as SE-0025 (SE means Swift Evolution): https://github.com/apple/swift-evolution/blob/master/proposals/0025-scoped-access-level.md – BaseZen Aug 18 '16 at 20:51

1 Answers1

3

There is no difference conceptually; moduleprivate was just a possible alternate name for the same access level that didn't get accepted during discussions about access control modifier naming.

https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160328/013854.html

The internal modifier is the only one of the two that actually exists in the Swift language, but the two names represent the same behavior.

Daniel Hall
  • 13,457
  • 4
  • 41
  • 37
  • 1
    Good find. But I wouldn't call that "no difference": "internal" is a Swift keyword and "moduleprivate" isn't. – Martin R Aug 18 '16 at 21:28