Question that is not really related to the product, but why using extensions?
Closed this issue · 3 comments
biogerm commented
Hi Developers in Ramotion,
I was reading the example code included, and noticed that you are using extensions a lot. For example in DemoTableViewController, every methods are written as extensions.
Is there any reason/benefit why you are writing it this way?
BR
AnChin
RayanSaeed commented
I wanna know as well..
Laptopmini commented
Swift 1 did not have pragma marks, which made extensions become the standard for code organization at the time.
The guidelines do not enforce this anymore, but it's still widely used.
https://swift.org/documentation/api-design-guidelines/
0ber commented
it's just coding style, read this article https://www.natashatherobot.com/using-swift-extensions/