Welcome, Guest. Please login or register.
Did you miss your activation email?
April 30, 2017, 03:38:21 PM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Chapter Study
| | |-+ Chapter 7 - More on Classes
| | | |-+ Dot operator and Multi-Input Methods
Pages: [1] Go Down
Author Topic: Dot operator and Multi-Input Methods (Read 1738 times)
Posts: 11

on: March 25, 2009, 02:33:07 PM

In Ch 7 on pages 140-141 the Dot Operator or syntax is introduced. Being familiar with this type of syntax from other languages, it seems comfortable. Two questions though...

1) Right after that on pg 141 Multi-Input Methods are discussed as in:

     [myFraction setTo: over:];

     Is there a way to translate these multi-input versions to dot notation?

2) I have read a great deal from people hating the dot way of coding. I think it will aid those moving from VB or other languages, but will it end up being considered bad code by many?
Hero Member
Posts: 3114

Reply #1 on: March 25, 2009, 05:38:15 PM

1. No, there's no way to use the dot operator with methods that take multiple arguments.
2. I'm not sure how I feel about using the dot operator myself.  In some cases in can hurt program readability, and in some cases it can help.  Since the operator was added to the language by Apple, it's likely it's her to stay and I wouldn't worry about it being considered bad coding practice.

This is a related post about properties: http://classroomm.com/objective-c/index.php?topic=180.0


Steve Kochan
Last Edit: March 25, 2009, 07:26:34 PM by skochan Logged
Pages: [1] Go Up
Jump to:

Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.