In comp.sys.mac.programmer.help Paul Floyd <root@[EMAIL PROTECTED]
> wrote:
> On Mon, 22 Oct 2007 17:25:53 -0500, Michael Ash <mike@[EMAIL PROTECTED]
>
wrote:
>> Would you happen to know of any downloadable Qt apps which look and
behave
>> like native Mac apps? I would love to see one. I think it would be
great
>> if there were a viable cross-platform application framework, but so far
>> every single application I've seen which was written in one completely
>> failed to look or act the way I expected. If there are proper apps
written
>> in Qt then perhaps my *****sment is wrong.
>
> I'm perfectly happy with Google Earth and Opera, which to my knowledge
> ae both Qt based apps.
I haven't really used Opera very much, but a quick test reveals pretty
serious problems. Tabbing between controls basically doesn't work; it
picks a small set of controls on the web page and never moves out of them.
I can't tab into the address bar at all. If I start out in the tool bar
then I can't tab to the forward/backward buttons, despite having set my
system to allow keyboard focus on non-text controls. The toolbar also
isn't customizable, which is not good. The preferences window is modal for
absolutely no good reason that I can see. The font picker used is a total
joke, and both it and the color picker are *also* modal for no reason.
This is just what I saw in a few minutes, and is all stuff you will avoid
"for free" by using a native API.
It shocks and surprises me that you would think Google Earth would make a
good example. I use it quite a lot, and the only reason I don't throw it
away is because I can ignore its GUI most of the time by virtue of its
main task being a giant 3D view of terrain, and because nothing else can
do what it does. Even simple things like pressing control-A in a text
field don't work. GE really makes no pretense of either looking or
behaving like a native application.
>>> It also has the huge advantage of not
>>> being written in an obscure dialect of C that is virtually unknown in
>>> the worlds of Windows and Unix.
>>
>> I never understood this argument. Objective-C takes virtually no time
to
>> learn when compared against the time it takes to learn an application
>> framework. The fact that it's not the same language as the rest of your
>> code should be irrelevant; your platform-specific code isn't going to
>> compile on other platforms *anyway*, so what's the big deal if it's
>> failing to compile because it's missing a bunch of libraries and
headers,
>> or if it's failing to compile because it's missing a bunch of libraries
>> and headers and is written in a language you don't happen to have a
>> compiler for?
>
> ****ting issues between SUSv3 platforms aren't too serious. Windows poses
> a lot more problems. However, Qt increasingly covers many non-GUI
> aspects as well. I've been programming C since the late eighties and C++
> since the early nineties, and I still consider that I have much to
> learn. Is Objective-C really that trivial?
Yes, it is. It is literally about half a dozen keywords and a handful of
syntax additions on top of C. Your C++ experience has probably colored
your thinking in this regard. C++ is a language you can work with
constantly for a decade and still find strange new corners. Objective-C is
not that kind of language. It is C, plus a small set of extensions that
you can literally learn in a day. If you know C already, then the
difficult part in becoming a Cocoa programmer is not Objective-C, it is
Cocoa.
To see what I mean, check out Apple's The Objective-C Programming
Language:
http://developer.apple.com/do***entation/Cocoa/Conceptual/ObjectiveC/index.html
The concepts are described in "Object-Oriented Programming", and the
syntax is described in "The Language". Everything in "The Runtime System"
except for "Type Encodings" is actually Cocoa, not Objective-C.
Perhaps now you can see why I think that Objective-C is not a real
obstacle. If Objective-C were dominant and everybody had to learn C++ in
order to program for some obscure platform, I could definitely see it. But
the reality is the opposite, and ObjC is really pretty trivial.
>> If you could elaborate a bit on your reasons for thinking that
>> Objective-C itself is a problem without resorting to FUD words like
>> "obscure" and "virtually unknown", I would very much like to know what
>> they are.
>
> Well, in my career I've never met anyone that used Objective-C. This may
> be due to the fact that I've always turned in engineering/telecomms
> circles, which are dominated by C, C++ and Java running on Linux,
> Solaris, Windows (and in the past, HP-UX, AIX, Irix and Tru64/DEC
> unices). The simple lack of market present is already a pretty much
> insurmountable barier to the Mac entering the EDA market. Any
> expectation for code to be ****ted to Objective-C would be pure fantasy.
Unfortunately I have no idea what EDA refers to, but I can't understand
why you think that your personal experiences in a single market would have
a bearing as to whether this language is known in general. I also can't
understand why you use the phrasing "****ted to Objective-C", because
nobody in their right mind would do such a thing: you write your GUI in
Objective-C, and you keep your cross-platform code in C or C++ where it
belongs.
> Outside of these circles, searching for "C++" on www.jobserve.com gives
> me 3430 hits. Objective-C? 1. That's right, one hit. And the title for
> the job offer? "C++ Mac Developer - Belgium - Cocoa Xcode OSX". (For
> real job prospects, Java rules with 5968 hits).
>
> Are you going to persist in arguing that Objective-C is not obscure and
> virtually unknown?
Yes I am. If you can use personal anecdotes then so can I. I'm a Mac
programmer. I do Cocoa and Objective-C. All of the programmers I know
are also Mac programmers, either professionally or as a hobby, and they
all know Objective-C. Just because you don't know anyone doesn't mean it's
unknown and obscure overall, just that it's unknown and obscure in your
circles. There are tens of millions of Mac OS X machines in the world.
They all make extensive use of Objective-C. There are a lot of programmers
making software for those machines. Are you going to persist in saying
that objective-C is obscure and virtually unknown?
Sure, it's not as popular or well known as C, C++, or Java, but that's a
ridiculously unfair test, like saying that asking for UNIX is not
justified because UNIX is not popular or well known compared to Windows.
You seem to be making the common mistake of thinking of a language as a
critical bullet point on a resume. There's no reason it has to be that
way. If you need somebody to do Objective-C, find someone who's good with
C and who knows an OO language (something with duck typing preferred, Java
will do, and C++ could be sufficient if you absolutely can't find anything
else) and have him learn the language. It simply will not take long enough
to justify requiring him to have already learned it elsewhere. If *you*
need to do Objective-C, start learning. It won't take you long. Your
investment in time will be repaid rapidly. And sure, knowing that language
may not help you get a job directly, but who cares? That's not how *I*
decide whether or not to learn something.
>> I would also like to point out that your use of "the world of UNIX" is
>> extremely non-standard. Mac OS X is the most widely used UNIX* out
there,
>> and it wouldn't surprise me in the least if it had more than 50% of the
>> UNIX market. I would therefore argue that Objective-C is in fact
extremely
>> *well* known in the UNIX world, due to the massive dominance of the Mac
in
>> this world. Given all this, I assume you meant to say the non-Mac UNIX
>> world.
>
> From a Qt standpoint, the three groups of sup****ted platforms are
> 'win32', 'unix' and 'macx'. I'm aware of Mac OS X's unix
> underpinnings (I've dabbled with FreeBSD since version 2.10).
I really couldn't care less about what Qt thinks about the issue.
Obviously for GUI frameworks, the Mac is going to have to be in a separate
category due to the fact that it doesn't use X11 natively. But that
doesn't mean that it makes sense to talk about a "world of UNIX" and not
include the Mac in that world.
Overall, you seem to have some common misconceptions about Objective-C and
Cocoa. You seem to think that ObjC is a vast, complicated, C++-like
language, which simply isn't the case; you can learn enough to get started
in hours. You seem to think that ObjC is an all-or-nothing prospect,
requiring you to "****t" code to it, when the reality is that ObjC will
talk to C with no problems, and ObjC++ lets you interface directly with
C++ code.
Sure, no matter how great Objective-C and Cocoa are, it's still going to
be harder to write a native GUI than it will be to rely on something like
Qt. It's also going to be harder to translate your app into Chinese than
it will be to just leave it in English. But if you're releasing a special
China edition and you expect it to actually have any success, you're going
to have to get it translated. Likewise, if you're going to make a Mac
version of your software, it will pay to get it translated into the native
tongue.
--
Michael Ash
Rogue Amoeba Software


|