hyperoslo / hyperoslo/ios-foundation

Naming in frameworks

Open
#40 11 comments 3 reactions 0 assignees View on GitHub
discussion
Dominant language
Ruby
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Hey guys! So, when doing the `swift-3` migration for `Spots`, I had an idea to improve (in my opinion) the naming in the framework. This would involve removing the `Spots` prefix that is used both for internal and external components used in the component. As @RamonGilabert mentioned on Slack, being consistent is key.

So, where should we draw the line on where to use the prefix and when to drop it? Should we always use prefixes for all components in a framework (Obj-C style)? Or should we move away from that and try to rely more on module name spacing.
## Examples

First example with implied name spacing.

``` swift
let controller = SpotsController()
```

Without naming spacing.

``` swift
let controller = Controller()
```

Without naming spacing with project conflicts

``` swift
let controller = Spots.Controller()
```

Personally, my vote is on going for the module spaced approach, I think it is very hard to find a good middle ground when to include the name spacing and when to exclude it when building framework if we go for alternative one. To be truly consistent, without to many rules, then everything should use the prefix.
What do you guys think?

ping @hyperoslo/ios

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.