|
on what you're trying to achieve.
If you want to understand how computers work, then a thorough understanding of assembler language is mandatory and machine code is a good endeavor.
If you want to hack out some code to make some buckos, then start with the Language of the Day. (Which is likely different than next month's LOD.)
Gary
|
|
|
|
|
If theres a good chance that you are going to write in C/C++ then please learn on a language that doesn't have garbage collection. Your future colleagues will be grateful.
It seems to me that learning on a weak typing language is not particularly harmful because moving to a strongly typed language will simply mean a little pain and a steep learning curve.
No language in itself is going to imbibe you with good programming skills IMO.
Murray
|
|
|
|
|
Without GC, 90% of the programmers would stop being programmers.
To those who understand, I extend my hand.
To the doubtful I demand: Take me as I am.
Not under your command, I know where I stand.
I won't change to fit yout plan. Take me as I am.
|
|
|
|
|
I think that's 1/2 the point of the guys message......
My first language: C
My regrets: None.
The worst thing about the darkness is the light at the end - DX-MON
|
|
|
|
|
To learn basic programming concepts like data structures and alorithms, I vote for something readable, clean and *not* object oriented: Python is probably a very good choice for a beginner, and some flavor of Pascal would be probably good too.
Later, some assembly language knowledge is very good to learn the basics and be able to do serious debugging and crash analysis.
For system programming, the next logical step is C, then C++.
For web programming: HTML, JavaScript and one of: Perl, PHP, Ruby, Java, C#
For "enterprise" programming: SQL and one of: C#, Java, COBOL, Visual Basic.
modified on Monday, April 7, 2008 9:50 AM
|
|
|
|
|
They're similar but different enough that they shouldn't be grouped together.
|
|
|
|
|
i too agree.
Peacon
|
|
|
|
|
Conceptually Java and C# is the same thing, give or take a few things.
|
|
|
|
|
If you're going to group Java and C# together, then you might as well group all the C-based languages together (C, C++, C#, Java).
|
|
|
|
|
C and C++ are very different from C# and Java - both in purpose and semantics.
|
|
|
|
|
The same could be said of C++ and C.
Len
|
|
|
|
|
LeonardReinhart wrote: The same could be said of C++ and C.
Not really - they are both system languages and C++ is designed to be a "better C" among other things.
C# and Java on the other hand are both geared towards enterprise application development, they run on virtual machines, have garbage collectors and similar object models.
|
|
|
|
|
C++ is object oriented. That is a completely new concept. I use C and C++ for very different things. Java, C# and VB.net I would use for similar things (conceptually) I prefer C# and VB.net.
Len
|
|
|
|
|
LeonardReinhart wrote: C++ is object oriented.
C++ is not "object oriented". It supports OO among other things[^], but it is designed to be multi-paradigm.
LeonardReinhart wrote: I use C and C++ for very different things.
Why? The only reason I would compile anything with a C compiler today would be the lack of a C++ compiler for that platform. It is perfectly OK to use C++ as a "better C" without writing any object-oriented or generic code.
LeonardReinhart wrote: Java, C# and VB.net I would use for similar things (conceptually)
That is understandable - they are designed to be used for similar purposes.
|
|
|
|
|
C++ is designed to support object oriented programming. It is much more complex than C. I use C for small embedded projects. I believe there was some effort at producing an Embedded C++. Reading the rational for what was stripped out of C++ to get to Embedded C++ would lead to a better understanding of why C and C++ are different enough not to mix.
Len
|
|
|
|
|
LeonardReinhart wrote: C++ is designed to support object oriented programming
...among other things.
LeonardReinhart wrote: It is much more complex than C.
It is, but nothing mandates the use of these complex features. You can use C++ the same way you would use C with a benefit of the stronger type system.
LeonardReinhart wrote: why C and C++ are different enough not to mix.
I am not talking about "mixing" them, but using C++ as a better C.
|
|
|
|
|
The C++ compiler does unexpected things, there are a number of features introduced in the C++ language that is not good for a deterministic, fast, small embedded system. Spend a little time looking at what was stripped from C++ to make Embedded C++. C++ is not a better C. One of problems with C++ is that it tried to maintain some backward compatability with the C language.
Len
|
|
|
|
|
|
jlac1024 wrote: Ah, but semantically they're all nearly identical.
C# and Java, yes. C++ is very different from them.
jlac1024 wrote: The whole point is to learn how to define variables, use logic and logic tables for if/else/whatever statements, and basics of loops.
How about scopes and lifetime of objects? Then passing by value vs. reference? Destructors? Copy semantics?
jlac1024 wrote: Define an 32 bit integer in all 4 languages and tell me which one is different.
C: int32_t i;
C++: // no way to portably declare a 32-bit integer in standard C++ (will be the same as in C soon)
C#: int i;
Java int i;
|
|
|
|
|
|
jlac1024 wrote: However, if I say "define an integer variable" in all 4, would you be complacent enough to define it in the simplest terms and without fuss? This is, after all, a means for learning how to program and not the ins and outs of it.
How about declaring a string in all 4 languages?
|
|
|
|
|
jlac1024 wrote: Learning how to program would be nearly the same in everything based from C-style syntax.
Oh, no. No, that's just not true.
You might as well say, learning to write poetry is nearly the same for every verse form provided you use English words.
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
|
jlac1024 wrote: Again, we're not talking about making a full fledged application or tools associated with it, merely an understanding of the fundamentals in what you need to know to accomplish those things
C supports pointer arithmetic and preprocessor macros - Javascript and C# do not. JS and C# support lambda expressions - C does not. Floating-point arithmetic differs widely. C# supports initializer lists for objects, JS is built on associative containers and first-class functions with literal syntax for both, C supports static initializers for structures... Both C# and JS have some sort of garbage-collection as an integral part of the language, while C requires library support for any heap-allocated storage and leaves both allocation and deallocation to the programmer. Etc...
Writing C#-style code in C is a great way to write terrible, flaky software. Writing C-style code in C# is a great way to write terrible, verbose, unsafe, and unreadable C# code. Using either style when writing JS code is gonna produce slow, ultra-verbose code. Worse yet, all of these practices exchange the advantages of the respective target language for the limitations of the source language. The worst [C|C++|Java|Javascript|C#|...] programmers tend to be those that think they already know the language because they've learned some other C-style language in the past. The fact that you can write C-style code in C++ without serious penalty is the only reason why they can be grouped, but even then you're obviously failing to take advantage of the language even if you aren't actually suffering any real harm in not using a dedicated C compiler.
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|