Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

GorillaPaws

macrumors 6502a
Original poster
Oct 26, 2003
932
8
Richmond, VA
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?
 

MorphingDragon

macrumors 603
Mar 27, 2009
5,160
6
The World Inbetween
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?

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.
 

GorillaPaws

macrumors 6502a
Original poster
Oct 26, 2003
932
8
Richmond, VA
...a code beautifier

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.
 

MorphingDragon

macrumors 603
Mar 27, 2009
5,160
6
The World Inbetween
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 do some of this by tweaking xcode's p-list, but this 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.

If Apple is trying to Ape Visual Studio, then custom formatting would be implemented by a pseudo-scripting language.
 

Catfish_Man

macrumors 68030
Sep 13, 2001
2,579
2
Portland, OR
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.