Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
October 18, 2017, 06:31:04 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
  Print  
Author Topic: Dot operator and Multi-Input Methods  (Read 1804 times)
Razz2
Newbie
*
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?
Logged
skochan
Administrator
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

Cheers,

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

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 ゥ 2009 classroomM.com. All rights reserved.