Giter VIP home page Giter VIP logo

dogs-challenge's People

Contributors

andreanmasiro avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dogs-challenge's Issues

OCP Warnning!

var appCoordinator: AppCoordinator?

I think this property don't need to be open, I did a quick search in the app and the only class access it is the AppDelegate and I could see we do not need to open "for now".

So I think it should be:

private var appCoordinator: AppCoordinator!

Maybe In the feature other modules of app will want access it and the access should be changed to:

private(set) var appCoordinator: AppCoordinator!

But for now we should not presume the feature and make it simple, and focus the main issue, to not bring complexity to code.

Close the classes that do not need to be inherited or were not made for this

This is not only for this part below but is too a topic about classes declarations in general:

class AppDelegate: UIResponder, UIApplicationDelegate {

The final statement at the begin of the class declaration. It's important for us because indicates:

  • The Class is not open for modification ๐Ÿ˜.

  • The developer not planned this to work with inheritance and to open it maybe we should understand what's going on and make some modifications if needed.

  • In the other hand (in the rainbow world), if the class not use this statement (final) I could trust on the Dev and know when this class was created he thought in the inheritance of it.

We can discuss this per skype or message, because it is a very long topic.

Not most important, but has your shine!

It helps the compiler make optimization to your class. Run time says: Thanks! hahahahah.

To see this information read:

http://blog.human-friendly.com/the-importance-of-being-final

I think Swift language should adopt the final statement as default like Kotlin:

By default, all classes in Kotlin are final, which corresponds to http://www.oracle.com/technetwork/java/effectivejava-136174.html">Effective Java, Item 17: Design and document for inheritance or else prohibit it."

There are a lot of advantages =)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.