4 ms·
I have to disagree here. If Obj-C was my introduction to CS/coding as a teenager, I'd turn around, and run away as far as possible (like I did when I was introd
by lquist 14y ago
I have to disagree here. If Obj-C was my introduction to CS/coding as a teenager, I'd turn around, and run away as far as possible (like I did when I was introduced to C as a teenager). Now, Ruby (or Python, JS, etc.)...that's another story altogether...
- brianchu 14y agoThe tutorials do assume you know basic coding already, and the tutorials do quite a bit of hand holding to ratchet up the exposure to Objective-C, so it really shouldn't be scary. As someone who thought Objective-C was a terrible language with weird syntax at first, I'd have to say that 1) Verbosity shouldn't be mixed up with complexity, 2) You get used to the different syntax in a couple of days, and 3) Objective-C code is really readable once you get used to the syntax, in the sense that you never have to guess at a method's parameters.
- jaipilot747 14y agoCould you explain about 3? Do all function calls require named arguments? (Never done Obj C)
- brianchu 14y agoIt's not required, per se, but it is idiomatic. You will never see an unnamed parameter in the standard library, or in most other people's code. In a sense, the parameter name is actually part of the method name Wikipedia has this example of Objective-C, which illustrates what it looks like: [window addNewControlWithTitle:@"Title" xPosition:20 yPosition:50 width:100 height:50 drawingNow:YES]; This is essentially calling the addNewControlWithTitle:xPosition:yPosition:width:height:drawingNow: method on the window object.