"Code Fixer" app in Xcode 4?

Discussion in 'Mac Programming' started by GorillaPaws, Jun 9, 2010.

  1. GorillaPaws macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #1
    In this thread it was mentioned mentioned that Xcode 4 has a "code fixing app. I haven't come across any leaked info on this, but it certainly was intriguing.

    Assuming this rumor is true I have some questions. What would be the advantage of having something that "fixes" your code in an app separate from Xcode? I can understand something like instruments needing to dynamically assess your app, but in this case, if it's based on static analysis, it seems strange that it would be in a separate application. Being a separate application seems especially odd, given that it's now pretty well-known that Apple has merged Xcode and IB into a single app.

    What kinds of things might be possible here? Is it theoretically possible for something like this to read the various paths through your code and suggest better optimized code based on pre-defined design pattern rules? Are there some other cool possibilities?
     
  2. MorphingDragon macrumors 603

    MorphingDragon

    Joined:
    Mar 27, 2009
    Location:
    The World Inbetween
    #2
    It might just be a syntax checker and a code beautifier.

    Honestly, the only thing XCode needs is a code sense that works and a more streamlined UI. All the extra features in Visual Studio are just counter productive IMO.
     
  3. GorillaPaws thread starter macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #3
    I didn't think of that. This would be great if you could plug in your personal coding style and have it auto-format your code. I realize you can currently do some of this by tweaking Xcode's p-list, but code beautificaiton would be pretty sweet. The other nice thing about something like this is that everyone can code using their own personal style, and then format it out to whatever the project requires.
     
  4. MorphingDragon macrumors 603

    MorphingDragon

    Joined:
    Mar 27, 2009
    Location:
    The World Inbetween
    #4
    If Apple is trying to Ape Visual Studio, then custom formatting would be implemented by a pseudo-scripting language.
     
  5. Catfish_Man macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #5
    This is just clang's fixit mode, which has been public (since clang is open source) for quite some time in the llvm repository. It's essentially offering suggestions to particularly unambiguous warnings. i.e. "there should be a semicolon here" -> "add semicolon".

    I have no idea why people are calling it an app. That's just silly.
     
  6. GorillaPaws thread starter macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #6
    Meh... this had the potential to be so much cooler.
     

Share This Page