Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
May 21, 2018, 09:46:33 AM *
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
Author Topic: Dot operator and Multi-Input Methods  (Read 1961 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:


Steve Kochan
« Last Edit: March 25, 2009, 07:26:34 PM by skochan » Logged
Pages: [1]   Go Up
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 All rights reserved.