objective c syntax
Posted: Sun Jun 15, 2008 11:11 am
Any objective c coders in the house??
I am trying to figure out what was the purpose of the objective c syntax. What are the advantages? why not use a more normal syntax(c,c++, java, php) and do something like frac->setNumerator(1)
Also there seems to be a lot of little additional characters to help the compiler(maybe)
Maybe someone with object-c experience can share some light. Thank you
// set the values
[frac setNumerator: 1];
[frac setDenominator: 3];
// combined set
[frac2 setNumerator: 1 andDenominator: 5];
I am trying to figure out what was the purpose of the objective c syntax. What are the advantages? why not use a more normal syntax(c,c++, java, php) and do something like frac->setNumerator(1)
Also there seems to be a lot of little additional characters to help the compiler(maybe)
Maybe someone with object-c experience can share some light. Thank you
// set the values
[frac setNumerator: 1];
[frac setDenominator: 3];
// combined set
[frac2 setNumerator: 1 andDenominator: 5];