Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Your Job As A Teacher

Author: Gerd Isenberg

Date: 12:05:41 07/31/03

Go up one level in this thread


On July 31, 2003 at 12:46:27, Omid David Tabibi wrote:

>On July 31, 2003 at 04:17:47, Graham Laight wrote:
>
>>On July 30, 2003 at 00:00:54, Robert Hyatt wrote:
>>
>>>Depends on your ultimate goal.  If you are going to be a programmer, it is
>>>not the best way to go.  If you program in Java for 4 years, then leave and
>>>go to work where they use C, you have a _long_ learning curve.  You've never
>>>seen pointers, for example.
>>>
>>>We took a _lot_ of heat about that from companies like BellSouth.
>>
>>It sounds to me as though Java is better than C, because it prevents errors with
>>type.
>>
>>For most businesses, the most pressing requirement is to make good code
>>cost-effectively - not to make super-fast code expensively. C is clearly going
>>to take longer to write and debug if it doesn't force type compatibility.
>
>When you learn C++ (which includes C in itself), you can very easily learn Java
>later. But it doesn't work the other way round: when you get comfortable with
>Java, you simply won't grasp the bizarre way the pointers work...

I don't find C a good didactical language.
If you have two ore more dimensional arrays for instance, there is often
confusion to pass them to a procedure via pointer.
Same for character arrays:

char  someNames1[][8] = {"Otto", "Heinz", "Eduard"};
char* someNames2[]    = {"Otto", "Heinz", "Eduard"};

int main (void)
{
  for (int i = 0; i < 3; i++)
    printf("%s %s\n", someNames1[i], someNames2[i]);
  printf("sizeof (someNames1) = %d\n", sizeof (someNames1));
  printf("sizeof (someNames2) = %d\n", sizeof (someNames2));
  return 0;
}

The reason for Bjarne Stroustrup to leave pointer in C++ was backward
compatibility:

http://www.research.att.com/~bs/bs_faq2.html#whitespace
http://www.research.att.com/~bs/bs_faq2.html#pointers-and-references

>
>In many programs Java would be a better choice than C/C++, but a programmer
>should always have the skill to write optimized code when needed.

Yes, a little assembler experience is also fine for debugging C/C++.

>
>Recently there was some initiative to replace C++ with Python as the main
>programming language in our CS department. That initiative was fortunately
>blocked, now we just have to block Java from taking over :) If it was up to me,
>I would have replaced all those Prolog/Scheme/etc courses with more
>C/C++/Assembly stuff! Why the hell should the students learn Prolog these days?!
>
>>

May be to see some other programming paradigmns...

Gerd



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.