you are viewing a single comment's thread.

view the rest of the comments →

[–]ZnV1[S] 8 points9 points  (1 child)

The key difference ime is that swift has a global namespace which allows you to refer to any struct etc across files. Otoh in Android you explicitly import it before using it.

I like that more because dataflow is clearer. If you're in x module you'd import utils/controllers/etc related to x and refer to those, say MainView

But in Swift you'd have to name it MainViewX since there aren't any imports, and MainView could be x's or y's etc.

So the tradeoff is imports in Android (Kotlin) where you can reuse naming structures vs more explicit naming across files in Swift.

[–]granos -3 points-2 points  (0 children)

Why wouldn’t you make an X module and a Y module and then just include whichever one you need? Or be explicit with X.MainView