Tags:
"NSNumber* value = [[NSNumber alloc] initWithFloat:1.0];" looks gorgeous to me. Very much a clean, terse syntax. Send a message to the NSNumber object to allocate memory to an instance of it, to be called 'value', and tell the instance to initialize itself with floating point value 1.0.
Now, what would a sexy line doing the same thing look like to you?
MacRuby is in development. It stalled out for awhile, not sure if it is back on track:
http://www.macruby.org/
Dan, If they invented a new language wouldn't that be NIH? ;)
Lee Altenberg: So, you are objecting to all the extra characters in the Objective-C code. All those characters are essentially degrees of freedom. It would appear that there are useless degrees of freedom in the Obj-C code. So the question is, are they truly useless? What about "alloc"? What do you get for those 5 characters? The answer is in the alternatives that could go there. The NSNumber class object has many other methods that could go there:...(clip)
unsafe static void SquarePtrParam (int* p) { *p *= *p;
}
unsafe public static void Main() {
int i = 5;
// unsafe method: uses address-of operator (&)
SquarePtrParam (&i);
Console.WriteLine (i);
}
© 2024 Created by Daniel Leuck. Powered by