[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it too hard to program for the Apple?



On Mon, 22 Feb 2010, D Finnigan wrote:

Michael Black wrote:
On Mon, 22 Feb 2010, D Finnigan wrote:

Thanks to everyone's responses, I've decided to slow down, man up, and
learn
to program in C for the Apple IIe, and also hopefully learn more assembly
as
well.

Assembly is pretty fast, C is really slow.


Slower even than Applesoft? That's not the impression that I got.

No, the compiling.

The comparison is that in the old days you'd enter a small program
in BASIC, and when you'd run it, it would snap back to the prompt
almost instantaneously. A simple program and one that didn't have prompts. You could see the errors immediately.

Run C on that same 1 or 2MHz computer, and it would take forever
to compile the program.  Once the program was compiled, it would
have been as fast as an assembled program would be.

But, on this 1GHz Pentium, I get the prompt back when compiling a
small C program in almost as little time as it used to take to get the prompt back from running a simple BASIC program back then.

Which makes C a lot more useful as a programming language.  One
reason people liked BASIC was that it was generally an interpreted
language, and if you had errors you'd see them as soon as you ran
the program. It was much more interactive, and anything you changed, you'd see the results immediately.

With a compiled language, you had to wait for the compile, and in the old days that took time.

When I can compile a C program now as fast as I could run a BASIC program in the old days, there is no longer a "benefit" to using BASIC.

  Michael