• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

C++ programming.

Status
Not open for further replies.
Level 10
Joined
Nov 28, 2008
Messages
655
C++ is C with OO crammed into it.

Notice the word crammed. That is not a positive word, it has negative connotation in this case.

C++ is a BEAST, and no one should ever use it. It is just C, which in itself is complex enough, with Objects pushed into it for whatever reason.

So when people that have experience tell you to not use it, you should listen. It is, in my opinion, one of the worst languages ever written. OO is just easier to manage, and with EPIC compilers, it is equal in speed to non OO languages, kind of. I am a procedural guy all the way, but if you really wanna go OO, still don't use C++.

Pretty much, don't ever use C++ unless you NEED to. EVER. It is horrible to work with.

If you are trying to make a game, and you are trying to learn a language for a game, and you don't know anything about many languages, I would suggest getting some schooling in, or spending vast amounts of time working with a language before you just decide to attempt a project. Knowing how that specific language works is what makes programming and art, and fun to do. You can't make it efficient or cheat in any way if you don't have an intimate understanding of how the language works.

If you are determined to do so though, listen to these guys, get some learning in you, and read as much as you can. These kinds of things really can't be fully taught over a forum, so you would need to use language specific pools of information.

I am not saying don't do it, but I am saying that you need more prep time. Learn the language, then do something cool with it.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
It's... erm, barely OO at best.

In addition, there's a lot more than classes added to C++.

I like C# (I hope vex doesn't see this thread :p), C(++).
Yay for C, blah for the others.

I've tried Delphi, but := is really annoying. Java is alright too.
Why is := so annoying? Because it's different? You should try functional programming some time—it would probably be good for you.
 
It's... erm, barely OO at best.

In addition, there's a lot more than classes added to C++.

Yay for C, blah for the others.

Why is := so annoying? Because it's different? You should try functional programming some time—it would probably be good for you.

Why is := so annoying? Because it's different? You should try functional programming some time—it would probably be good for you.

Because it's annoying have to hold shift every time I want to set a value.

It looks ugly too.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
You would just love cLISP then:

(setf foo bar) ;discouraged if practical/possible to avoid

Or even better, Scheme:

(set! foo bar) ;highly discouraged and often not even allowed

Or even better, Haskell:

Never allowed.


It only looks ugly and is annoying because you are stuck in the C/etc way of thinking about syntax. I think you'd be surprised to find that there is a lot of variety in languages.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
All of which (with the exception of Delphi, I guess? (for assignment at least) and (sort of) JASS (for assignment again, not for anything else)) use identical operators for half of the native expressions, and promote similar ways of thinking (Ruby less so if you use it right, but many don't).

Blah. People get way too caught up over syntax. I like an elegant language as much as the next person (although my idea of what an elegant is is way different from most peoples'), but I don't freak out if it is a little different or if I find one piece slightly weird.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
It is not faulty, it is simply not developed. Not that it would be hard to build the habit, but when changing good things, there should be a reason.
= is by no means the original, so saying that they are "changing" it is not necessarily true.

Well, to be more precise there were more or less two operators: = (in FORTRAN, and FORTRAN didn't set—well, any standards really—for modern languages), and the LISP setf style.
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
PHP:
#include <iostream>
using namespace std;
//here we could put global variables

int main ()
{
    //declare variables(local)
    int a, b, c, d, e, f, g, MO, tests;
    float result, savemsg;
    bool boolean;  
    //show texts
    cout << "Now we are going to try a few maths..." << endl;
    //main part of the program
    boolean = false;
    cout << "If you want to calcuate the average number of some numbers,type 1" << endl;
    //you type a number
    cin >> tests;
    //we add conditions to check the number
    if (tests == 1)
    {
             cout << "Type how many numbers you want to calculate and find their average,max numbers are 7" << endl;
             cin >> tests;
             if (tests == 1)
                  cout << "Type your number...";
                  cin >> a;
                  cout << "The average is:", a;
                      }
             else if (tests == 2)
                  cout << "Type your numbers...";
                  cin >> a, b;
                  MO=(a + b) / 2;
                  cout << "The average is:", MO;
                  }
             else if (tests == 3)
                  cout << "Type your numbers...";
                  cin >> a, b, c;
                  MO=(a + b + c) / 3;
                  cout << "The average is:", MO;
                  }
             else if (tests == 4)
                  cout << "Type your numbers...";
                  cin >> a, b, c, d;
                  MO=(a + b + c + d) / 4;
                  cout << "The average is:", MO;
                  }
             else if (tests == 5)
                  cout << "Type your numbers...";
                  cin >> a, b, c, d, e;
                  MO=(a + b + c + d + e) / 5;
                  cout << "The average is:", MO;
                  }
             else if (tests == 6)
                  cout << "Type your numbers...";
                  cin >> a, b, c, d, e, f;
                  MO=(a + b + c + d + e + f) / 6;
                  cout << "The average is:", MO;
                  }
             else
                  cout << "Type your numbers...";
                  cin >> a, b, c, d, e, f, g;
                  MO=(a + b + c + d + e + f + g) / 7;
                  cout << "The average is:", MO;
                  }
    }
return 0;
}


What's the problem here?Why doesn't this work?
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Speculating about what language is the future is bullshit. Also, you really shouldn't learn a language just because it's industry standard; you can learn those languages when you need to, and in the mean time learn something which will both be more enjoyable to code in and will broaden your understanding of programming.
 
Level 24
Joined
May 9, 2007
Messages
3,563
Speculating about what language is the future is bullshit. Also, you really shouldn't learn a language just because it's industry standard; you can learn those languages when you need to, and in the mean time learn something which will both be more enjoyable to code in and will broaden your understanding of programming. Learn Python.

Fix'd.

But in all seriousness, I find C++ is a massive pile of legacy code. It lacks the niceties of a designed language, and I just don't find it fun to work in.
 
Level 12
Joined
Aug 31, 2008
Messages
1,121
Translation: it's a giant heap of shit. It's totally undesigned, has more features than it knows what to do with, gotchya is almost literally its middle name, and the syntax is garbage.

Yeah, but that basically gave ground for all other languages to build on. Learning c++ really helps you learns several other languges, but not all of them.
 
Status
Not open for further replies.
Top