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

glossywhite

macrumors 65816
Original poster
Feb 28, 2008
1,120
2
So why on EARTH must there be twelve lines of code, when two would suffice:
Code:
#import <Cocoa/Cocoa.h>
@interface appController : NSObject {IBOutlet NSTextField *myText; IBOutlet NSButton *myButton; IBOutlet NSTextField *sourceText; 	IBOutlet NSTextField *lbl; IBOutlet NSTextField *resizedLbl; IBOutlet NSTextField *sentToDock; int cnt,rsz,std; } -(IBAction)sendText:(id)sender; @end
;)

Your comparison to my comment is illogical. My point is valid.
 

glossywhite

macrumors 65816
Original poster
Feb 28, 2008
1,120
2
I thought my comparison was perfectly logical. My point was: readability.

Your point had nothing whatsoever to do with the fact that:

Code:
int cnt,rsz,std;

is MUCH neater and more concise than:

Code:
int cnt;
int rsz;
int std;

which completely wastes space.

Your example is just out of context, and completely nothing to do with mine.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,679
8,303
A sea of green
Code:
	IBOutlet NSTextField *sourceText;
	IBOutlet NSTextField *lbl;
	IBOutlet NSTextField *resizedLbl;
	IBOutlet NSTextField *sentToDock;
Such a waste space. Rewrite it as:

Code:
	IBOutlet NSTextField *srcText,*lbl,*rszdLbl,*snt2Dk;
 

glossywhite

macrumors 65816
Original poster
Feb 28, 2008
1,120
2
Code:
	IBOutlet NSTextField *sourceText;
	IBOutlet NSTextField *lbl;
	IBOutlet NSTextField *resizedLbl;
	IBOutlet NSTextField *sentToDock;
Such a waste space. Rewrite it as:

Code:
	IBOutlet NSTextField *srcText,*lbl,*rszdLbl,*snt2Dk;

:p so true, so true - how could I have missed that?! :eek:

Having said that, I don't like to use too many abbreviations; theBestThingAboutObjectivecIsThatYouWriteCamelTextLikeThisToPreventAmbiguityFromOccuring
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
There's really an argument about this going on? This is definitely a style issue. Both styles are perfectly valid. Maybe i need to get rid of variable declarations all the time and deleting a line is faster for me than picking out the variable from a list. Maybe my monitor is wider than it is tall, so i can't get a lot of lines on a screen at once, so keeping line count down is really important. Maybe i'm getting paid per line of code so i need as much verbosity as possible.

The point is, different strokes for different folks. At runtime there will be no difference, and at compile time it will be extremely negligible, so do what's consistent with others on your project, and if you're it, do what you like.

-Lee
 

glossywhite

macrumors 65816
Original poster
Feb 28, 2008
1,120
2
There's really an argument about this going on? This is definitely a style issue. Both styles are perfectly valid. Maybe i need to get rid of variable declarations all the time and deleting a line is faster for me than picking out the variable from a list. Maybe my monitor is wider than it is tall, so i can't get a lot of lines on a screen at once, so keeping line count down is really important. Maybe i'm getting paid per line of code so i need as much verbosity as possible.

The point is, different strokes for different folks. At runtime there will be no difference, and at compile time it will be extremely negligible, so do what's consistent with others on your project, and if you're it, do what you like.

-Lee

Who's arguing? :D
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
Your comparison to my comment is illogical. My point is valid.

I thought my comparison was perfectly logical. My point was: readability.

Your point had nothing whatsoever to do with the fact that:
..
is MUCH neater and more concise than:
...
which completely wastes space.

Your example is just out of context, and completely nothing to do with mine.

...
Such a waste space. Rewrite it as:
...

Reads a bit like an argument to me. Heated discussion, then? =)

-Lee
 

glossywhite

macrumors 65816
Original poster
Feb 28, 2008
1,120
2
I often have my comments mis-interpreted as flaming or arguing, when, in fact, that may not be my intention. I am a passionate person, and I apologise if my comments come across as rude or argumentative - I don't mean them to be, in ANY way. :D
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.