2 ms·
> Why do I have to have huge statements like this? Uh, because you're declaring six static color variables. Also, they could be collapsed into one line. > Int
by natesm 14y ago
> Why do I have to have huge statements like this?
Uh, because you're declaring six static color variables. Also, they could be collapsed into one line.
> Introspection is unavailable at runtime
Not sure what this means. Everything is introspectable in Objective-C. #import <objc/runtime.h>
The cell dequeueing comparison uses a one liner for Ruby and an if statement for Obj-C. That's not a fair comparison. "dequeue ?: allocate" would be fair.
> dequeueReusableCellWithIdentifier, ugh.
What is wrong with this?
• I am dequeueing something from the receiver.
• It is a reusable cell.
• The first (and only) argument is the identifier for the cell.
What would be a better name, without losing the descriptiveness?
> Without tab completion, you do a lot of copying and pasting from the documentation when you find a method name you like, just to ensure you don’t accidentally typo it.
This is a huge problem, not a minor thing! The whole point of those "long" message (not method, btw, but that's minor) names is that you don't have to read documentation. If you want to append a format to a string, but don't know the name, just start typing "stringby" and the names are the documentation.
- Davertron 14y ago> dequeueReusableCellWithIdentifier, ugh. What is wrong with this? • I am dequeueing something from the receiver. • It is a reusable cell. • The first (and only) argument is the identifier for the cell. What would be a better name, without losing the descriptiveness? I don't think he's complaining about the name of the method, he's complaining about the fact that he has to type it all out now instead of Xcode completing it for him, which is a gripe against RubyMotion, not Objective-C or the cocoa API.
- spullara 14y agoXcode does complete it for you. So does JetBrains AppCode. I bet RubyMine would too with RubyMotion. IMHO, the name sucks because it includes information in the name that is also in the signature. At least it would be in languages that support overloading.
- ryanpetrich 14y agoText editors don't display method signatures (some IDEs do, but usually only in tooltips or autocomplete). When writing code in Java or C I often find myself looking up the method/function definition to be certain which argument is which.