C or C++ or C#
Members - Reputation: 100
Posted 30 August 2007 - 10:34 AM
If I can make a poor analogy, it's like baking a cake. With VB and I'd argue C# and java are the same, I felt like I was grabbing a cake mix adding water and making cake. It was fast, it was good and it worked but I wouldn't get the same feeling of understanding a cake until I mixed the floor, chocolate, etc by hand. One could say that truly, the cake is in the chemical compound. And neither one will teach me this but having to do everything by hand made me feel like I understand it all better.
I don't know if any of that makes sense but I definately see a good value behind learning C++, maybe not right away but soon after. And of course assembly.
There's all this debate about if it teaches logic, the machine, or virtual machine and what not. Place whatever I said where ever you want it. I'm just saying C++ helped a lot, I feel the natural structure of the language made me look a little bit deeper.
Moderators - Reputation: 2494
Posted 30 August 2007 - 10:54 AM
You're claiming C++'s "natural structure" made you "look deeper," and that you suddently felt you like a better concept of how things worked after you switched to C++. This is wrong. You may have a better understanding of the concepts in C++, but that doesn't scale to the general case; that doesn't scale to the level of being remotely connected to the actual metal running the actual software... But this is what the majority of mis-information about C and C++ leads one to believe, that in learning C++ they learn what's going on. The whole point of the recent discussion here has been to illustrate how, while the models chosen by C or C++ to represent some things (strings, pointers) might have a lower-level nature than what you may have experienced before, they're not the be-all-end-all of how the machine works. A string is not neccessarily characters in a null-delimited array, pointers are not neccessarily numbers, the stack and the heap are not universal concepts and they are not even neccessarily the same thing across programming languages.
This isn't to say that C++ isn't worth learning, this isn't to say that the C++ model for the aforemention things is wrong. What is wrong is to assume that the C++ model for those things is universal. Like strings, "pointers" or references, the stack and the heap in just about every other language and platform, all of those things are abstractions.
Crossbones+ - Reputation: 1292
Posted 30 August 2007 - 12:26 PM
Both aren’t the best suited languages for beginners. They can be useful, but at the beginning you should learn the higher level stuffs. You should learn how to arrive to a solution. The other things are secondary. And in C is harder to learn that things than in other languages like C#.
Members - Reputation: 246
Posted 30 August 2007 - 01:04 PM
In my eyes, none of the 3 languages really has a whole terrible lot over the rest. Anything you can do in C you can do in C++ and C# (with the exception of some of the picky cases you probably ought not be messing with anyways). The decision of which to learn comes down to which one you find easiest to work in. I use C because I'm not a real big fan of OOP. Just a personal preference. I haven't worked with C# yet (actually installing VC# right now), but I think I would probably recommend it over C++. C++ is the weakest of the 3 languages, imo. It's just plain uglier than C or C#, in my experience with it. But again, I can't stress enough that it's almost entirely your personal preference. Whatever language enables you to solve your problems fastest is the language you should use.
Toward that end, I recommend you at least dabble in all 3, then decide which one you like best.
Moderators - Reputation: 19293
Posted 30 August 2007 - 02:49 PM
Original post by Promit
I just want to point out that null terminated strings are a C concept. They have nothing to do with the low level workings, or inner workings, or any of that bullshit. Most languages don't even use null terminated strings; C++, Java, C#, and Pascal/Delphi all store explicit lengths.
Ok, but no-one said null terminated strings weren't just a C concept.
(I did say that null termination is a LL concept that C will expose you to)
Moderators - Reputation: 19293
Posted 30 August 2007 - 02:57 PM
The way I see it: Null termination is a general low-level computer concept (albeit not a very useful one) that transcends use by a single language. I was taught about null termination (or 9999-termination, etc...) back in school in a module about general computing algorithms, before I had even learned C yet.