Mike Ash:
gcc
provides two built-in functions which can be useful for building macros.
The first is __builtin_types_compatible_p
. You pass two types to this function (__typeof__
comes in handy here) and it produces 1
if the two types are “compatible” (roughly, if they’re equal) and 0
if they aren’t.
The second is __builtin_choose_expr
. This works like the C standard ?:
operator, except that the predicate must be a compile-time constant, and the type of the entire __builtin_choose_expr
expression is the type of whichever branch gets chosen; the two branches are not required to be similar types.
A good compilation of notes.
C Programming Language GNU Compiler Collection (GCC) Macros Programming
Lucius Kwok:
Turns out I should have picked a new, unique Bundle Identifier. Unique in the sense that it can’t be the same as the one from the previous version of the same app. Currently it’s com.felttip.SoundStudio. Something like com.felttip.SoundStudio.mas would have fixed it. But I never thought about doing that, because then it would mean that the preferences and document associations with the old app would not carry over to the Mac App Store version.
Being that my applications aren’t yet approved for sale, I’m trying to figure out whether I made the right choice in registering separate bundle IDs for my Mac App Store builds. I thought this made sense because, even with the same version numbers, the features will be different. However, there are certainly disadvantages to unique IDs as well, and now I’m leaning the other way. It’s unfortunate that Apple has been silent on this and so many other issues.
Update (2011-01-09): Apple advised Lucius Kwok to use the same bundle ID.
Tim Morgan:
I had a remarkably different experience upon opening the app. Much like with the App Store itself, the head-scratching UI left me bewildered and confused more than once.
John Gruber:
Twitter for iPhone follows this model to a tee: accounts, tweets, tweet details — arranged left to right, with animation as you move between them. In today’s new Twitter for Mac, though, the sliding animations when you switch between tabs add nothing contextually. They’re not merely harmless eye candy, either. As Morgan notes, these animations create a false sense of stacking where no stack exists. They’re technically excellent, but conceptually misleading.
I think Tweetie 2.0 (a.k.a. Twitter), though great in many respects, is a bit over the line in terms of custom user interface for the sake of looking cool. Custom UI makes sense when you have a problem that the standard controls and conventions don’t solve, but too often there doesn’t seem to be any design benefit from the deviations. I like having the title bar, toolbar, and search at the top of the window. I like being able to move the cursor without stuff fading in and out beneath it. It just seems very busy. I’d like to vote with my Dock and am tempted to use Hibari, but it doesn’t support multiple accounts yet.
Update (2011-01-09): John C. Welch comments and Tim Morgan follows up.
Update (2011-01-26): Riccardo Mori’s thoughts on the new Twitter for Mac.