NJ5 said:
I think the concepts involved in programming with C are crucial for any programmer, mainly memory management and pointers. They're better learned first, than struggled with later after the bad habits have setted in. For people programming in higher-level languages, the concepts involved in programming with Assembly are only crucial for the micro-optimizations minded programmer. That's my guideline for recommending C as a first language. Assembly can come later without harm.
|
The thing is, once you learn either C#, Java, or C++, you have pretty much learned the other two as well. Of course there are syntactical differences but those are simple to overcome, especially with a good IDE. Assembly is pretty much a niche area of programming as far as jobs go. As far as optimizations go, you pretty much just use well known programming practices in your code and the compiler takes care of the rest(sometimes you need to understand certain language specific optimizations).
For instance in Java
int j = array.length;
int sum = 0;
for(int i = 0; i < j; i++){
sum += array;
}
is slower than
for(int i = 0; i < array.length; i++){
sum += array;
}
due to compiler optimizations. The compiler knows the end of the array and doesn't make sure there is no index out of bounds after every iteration. Of course it is good to know about handling pointers and pointers can be an excellent way of creating data structures such as trees, hashes, etc, but sometimes letting other people take care of the dirty work helps out productivity.
EDIT: it seems to have gotten rid of my brackets on the array indexing and caused the text to be italicized.







