Programming D: (c#)
<nitpick_mode>
</nitpick_mode>
imho, C (or C++ for that matter) is not the bestest of languages to learn programming in... it has a lot of quirks and a complicated syntax..
if you never programmed before, you could try something pascal-based, or java if you think pascal is too old (C# should be a relatively clean language too, but i have never used it so i can't really say)
yes, and learning linux definitely helps, but that's an adventure on its own
_some_ c++ compilers will compile _some_ c codeMonkey wrote:C++ is really an expansion on C. C++ compilers will also compile C.
brainfuck is simple and totally as powerful as c++, but noone programs in it seriouslyMonkey wrote:C is simple but totally as powerful as C++.
</nitpick_mode>
imho, C (or C++ for that matter) is not the bestest of languages to learn programming in... it has a lot of quirks and a complicated syntax..
if you never programmed before, you could try something pascal-based, or java if you think pascal is too old (C# should be a relatively clean language too, but i have never used it so i can't really say)
yes, and learning linux definitely helps, but that's an adventure on its own
As a language, C# is great. It's like C++ with all the quirky bits removed. Java is halfway between the two The downside is that C# tied to .net, so it's difficult to get any graphical stuff done with it on non-MS systems. Interfaces to things like SDL and OpenGL exist, but they are very thin and confront you with all the quirky bits C# is supposed to hide from you, like pointers and memory management.
Also, the Armagetronad Visual Studio projects are outdated. Don't use them. Use the Code::Blocks stuff, and if you encounter errors, post them. Since we're all Unix guys, we're not in a hurry to adapt them to the latest source code changes either, so they're bound to break between releases.
Also, the Armagetronad Visual Studio projects are outdated. Don't use them. Use the Code::Blocks stuff, and if you encounter errors, post them. Since we're all Unix guys, we're not in a hurry to adapt them to the latest source code changes either, so they're bound to break between releases.
I hope that you aren't saying that no one programs in C seriously. I also hope that you don't think that C++ is "definitely better" than C.pavelo wrote:brainfuck is simple and totally as powerful as c++, but noone programs in it seriouslyMonkey wrote:C is simple but totally as powerful as C++
Z-Man wrote:C# is great. It's like C++ with all the quirky bits removed.
Is it a good thing, to be hidden from what is actually going on? Personally, I think that it is essential to understand what is going on and to be in full control. I don't like automatic typecasting and I think that understanding pointers/memory management/etc is important.Z-Man wrote:quirky bits C# is supposed to hide from you, like pointers and memory management.
IMO if you want to use a language that hides things from you, just to learn some basics of programming, then fine but don't use it for projects.
Playing since December 2006
Well, all you need to understand really, from an abstract level, is the difference between objects, references and values. They translate to objects, pointers and values in low level languages, hardly a difference. But what I was more getting at with C++ quirks is this:Monkey wrote:Is it a good thing, to be hidden from what is actually going on? Personally, I think that it is essential to understand what is going on and to be in full control.Z-Man wrote:quirky bits C# is supposed to hide from you, like pointers and memory management.
- object slicing
- virtual vs. nonvirtual functions
- accidentally not overriding a virtual function
- non-checked containers being the default
- semantics of iterator invalidation for STL containers
- name lookup rules
- the troubles of multiple inheritance
- lifetime of automatic objects
and more. All of that is specific to C++; pure C doesn't have these quirks.
Of course, to really know programming, you need to learn at least one language from each of the three main flavors:
1. Bare bone, low level. There, for learning purposes Pascal > C because it has a generally more readable syntax, but C still wins because nowadays, you have better tools for it.
2. Duck typed scripting languages. Python wins for learnability there over all alternatives.
3. High level object oriented languages. From a design viewpoint, C# > java > C++, and the same goes for ease of learning.
Of course, C++ also is in camp 1 (and one can argue about whether it even belongs in bucket 3), so it's a double win to know it; but really, the performance gain of C++ over C# or java is not all that big.
And no, I don't forget about functional languages (lisp, haskell). Serious geeks should know one of those, too, if only to customize emacs. But they're not for the average guy just wanting to get things done.
Here is a copy of a post I made on CT forums about Java:
My current opinion of Java is (and I'm with Kyle on this one) that Java does seem to suck.
Why?
1) Compulsory Virtual machine - If you want to write hardware specific code then you should be able to! C++ allows you to do either cross-platform, or hardware specific ...it lets you choose.
2) Virtual machine for small programs - Hello world program takes 20meg or something stupid. C++ can do small programs in much less memory.
3) Multithreaded Java is renowned to have bad performance. I have first hand evidence of this from a programmer I spoke to that had C and Java versions of the same program that his company used. There was a *huge* performance difference.
4) Java does not have multiple inheritance. C++ lets you use multiple inheritance. Surely good object-oriented code should have the most 'correct' representation of objects.
...etc
I'm no expert on Java or C++ but that is my current opinion.
My current opinion of Java is (and I'm with Kyle on this one) that Java does seem to suck.
Why?
1) Compulsory Virtual machine - If you want to write hardware specific code then you should be able to! C++ allows you to do either cross-platform, or hardware specific ...it lets you choose.
2) Virtual machine for small programs - Hello world program takes 20meg or something stupid. C++ can do small programs in much less memory.
3) Multithreaded Java is renowned to have bad performance. I have first hand evidence of this from a programmer I spoke to that had C and Java versions of the same program that his company used. There was a *huge* performance difference.
4) Java does not have multiple inheritance. C++ lets you use multiple inheritance. Surely good object-oriented code should have the most 'correct' representation of objects.
...etc
I'm no expert on Java or C++ but that is my current opinion.
emacs...yeah...because serious geeks would be using emacs...they wouldn't be using vim...no...they would be using emacs...that's right...emacs...Z-Man wrote:Serious geeks should know one of those, too, if only to customize emacs.
Playing since December 2006
Screwdrivers suck! Reasons:
1. They don't have enough power. If a screw is stuck, you can't apply enough torque to get it loose.
2. They're really bad at drilling holes. I mean, it's possible, but it takes AGES.
3. They're completely useless for nuts and bolts. Come on, that's seriously weak.
4. The path to the screw needs to be free. If there's an obstruction in front of the screw, tough luck.
Duh. Obviously, you need to choose different tools for different jobs. If you need absolutely top performance, a tiny memory footprint or access to inline assember/hardware stuff, then you won't have much luck with pure Java, C# or Python. If you want easy distribution without compilation for different platforms, you won't have much luck with C/C++. If you want small executables, you won't have much luck with C++.
1. They don't have enough power. If a screw is stuck, you can't apply enough torque to get it loose.
2. They're really bad at drilling holes. I mean, it's possible, but it takes AGES.
3. They're completely useless for nuts and bolts. Come on, that's seriously weak.
4. The path to the screw needs to be free. If there's an obstruction in front of the screw, tough luck.
Duh. Obviously, you need to choose different tools for different jobs. If you need absolutely top performance, a tiny memory footprint or access to inline assember/hardware stuff, then you won't have much luck with pure Java, C# or Python. If you want easy distribution without compilation for different platforms, you won't have much luck with C/C++. If you want small executables, you won't have much luck with C++.
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6712
- Joined: Thu Dec 18, 2003 7:03 pm
Z-Man wrote:Duh. Obviously, you need to choose different tools for different jobs.
Sounds like Tank agrees with me that there is too much choice?Tank Program wrote:That's why there's so much damn choice.
I can program in prolog but I'll be damned if I can find a use for it. I struggle to believe we need so many languages to choose from. More standards and less languages please. I have a real issue with Java. IMO, with enough standards for the use of C++, Java could be made obsolete...call me mad if you like.
People are also using languages that are 'easier' in situations where their chosen language is not the ideal choice. That is not a good thing.
Playing since December 2006
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6712
- Joined: Thu Dec 18, 2003 7:03 pm