I'm having a look at the new Swift. I come from C, C++, Objective-C... I notice that in swift is not possible (?) to separate the declaration and the definition of functions. The result of this is that structure and class declarations are very long and bloated, and it is therefore difficult to have a "quick picture" of the class by looking at the code. Am I doing something wrong? Is there any approach to overcome this problem, besides trying to make functions small, etc.? Thanks in advance
In swift, there is no separation of declaration vs implementation. This works like most other modern languages like Python. If you want to get a quick picture of your class, you should use code folding. Simply fold all your methods and functions. And unfold a method of you want to modify / work on it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With