Coder Social home page Coder Social logo

Comments (2)

jasperblues avatar jasperblues commented on August 19, 2024

AppCode does support a project level setting. . . Its possible to check these into the project as well, to save folks trying to match it.

I prefer to stick with the structured approach to laying out classes.

On Sep 1, 2013, at 4:31 AM, Robert Gilliam [email protected] wrote:

The existing organization of source files seems to consists of heavy use of pragma marks as separators, dividing methods into categories such as: initialization/dealloc and private methods.

I'm used to following the step-down rule, wherein methods are arranged such that a method definition is found below, and as close to as possible, the first method that calls it. I might annotate individual methods with comments, if helpful. For example, if overriding -(BOOL)isEqual:, I might make a note that that method is originally defined in NSObject.

The main advantage I see when following the step down rule is less jumping around the methods in an individual class, and I believe it helps comprehension.

Naturally, both these approaches conflict. I've rearranged the code to follow the step down rule myself when trying to understand what a particular class does, and have usually left it that way after any subsequent refactorings. I feel that we should decide on one of these approaches going forward and stick to it, for consistency.

I'm also going to try and do a better job going forward matching the style of the code as I'm writing it, so you don't have to go back and fix my out-of-place formatting. I don't think Xcode has anything like this, but does AppCode support project level code style settings? For indentation and code generation and the like? I know AppCode has extensive style settings, but I seem to recall that they are global.


Reply to this email directly or view it on GitHub.

from typhoon.

rhgills avatar rhgills commented on August 19, 2024

Got it, structure it is.

And a project level setting sounds fantastic, I'll have to look into that.

from typhoon.

Related Issues (20)

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.