
At 17:22 28/04/2004 Michael Cree did say...
On 28/04/2004, at 3:24 PM, Orion Edwards wrote:
1. Is C still a viable language to learn to write programs for PC/MAC Ideally in Win MacOSX (cocoa looks nice) and Linux or should I be looking at C# / Mono / QT / ??
There's 2 programming languages you need to learn. C++ (Treating C as a subset of C++ here), and everything else.
<snip>
No, do not just learn C, as a lot of 'next gen' languages are Object Oriented. If you only learn C, you won't learn about that, and be in for some strife if you do try and learn C#/Java/etc. Find a good C++ course, and get stuck into it.
I happen to disagree with that, for two reasons:
1) Object oriented programming is hugely overrated. 2) What C++/Java/C# etc compilers are there for microcontrollers?
Keil, Metroworks & Hi-Tech produce C++ compilers for microcontrollers. I have played with a number of Java engines for microcontrollers, nice idea but I while to go yet.
Having said that, I have to admit C is not a good teaching language as it allows the programmer to program very badly. Other languages impose constraints which force good programming practices, and for learning to program, they are to be preferred.
I actualy, and strange as it may be found starting with BASIC and moving to C was not very painful. Learning to program with pascal is the best way to go.
But, as you say, you aim is to program microcontrollers effectively and efficiently. There is only one language (other than various assembly languages) you need to learn, and that is C. So ignore the computer scientists, who do not know what they are talking about - they have never programmed microcontrollers - and learn C.
I think the best book is Kernighan and Ritchie. They wrote C and in their book they explain the justifications for why C is the way it is. Furthermore they write good C. The main problem is, the book is too expensive and I understand that they are not updating it for C99 (mind you, the second criticism may not be an issue for microcontroller compilers, since due to low sales, are not going to be in a hurry to update their compilers to the new standard).
Having written the above I now see that your history was writing for microcontrollers and now you want to program PCs. Doh. Can't be stuffed rewriting this now....
Michael.
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug