Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C/C++, which one first
#11
Quote:When FB gets OOP I'll show you. ;P
I can't wait.
Reply
#12
Quote:Again, I think it's wrong to say that a language is a bother just because there may be some people that don't know how to use it properly. I would give the OP the benefit of the doubt.
I should have as well :oops: I'm just a cranky old man sometimes.

I don't know what you mean by tricks (or "mong", for that matter), but to do some of the more basic and elegant things in C++ - like polymorphism, for example - requires a level of knowledge of C that is much greater than either a beginner or intermediate programmer. C++ takes much of the work involved in memory management and does it for you, unlike C where memory management is always a top-level concern.[/quote]

'Mong' is a really old word for making things or selling things
It's why a person who sells fish is called a Fishmonger.

I like to think of programmers as codemongers, with the internet as code markets (like fish markets) where coders get together and comment on and trade code. Sometimes my analogies get ahead of me :oops:

In anycase I still go against C++ because of the habits those who program in it poorly tend to get in, namely using OO where you could use a list or even a simple array. Complexity for Complexities' sake. I'm not saying OO is bad, OO is a great thing when used correctly, I'm just against people using it where it is innapropriate to do so and I see this quite a lot in C++ code.

I'm actually quite excited about OO coming to FB myself as well. Big Grin
i]The short answer is 'Yes.' The long answer is 'No.'[/i]
Reply
#13
#1 flaw of C++: it allows for non-OO stuff. As a language, in the purity of the word, it has that incredible flaw. I prefer the cleanness of Java, for instance.

@Cha0s: everything you say about OOP, you can do with procedural languages. It's all just a matter of syntax shortcuts and macros.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#14
Mong here (England) now means a retard, or at best a very slow, dim-witted person. ('Special Needs' for the polically correct). Its a common insult.
EVEN MEN OF STEEL RUST.
[Image: chav.gif]
Reply
#15
Quote:Mong here (England) now means a retard, or at best a very slow, dim-witted person. ('Special Needs' for the polically correct). Its a common insult.
England! What would England know about english! Tongue
i]The short answer is 'Yes.' The long answer is 'No.'[/i]
Reply
#16
na_th_an: I wouldn't say C++ is the epitome of anything. I agree that, because of its support of a wide variety of paradigms, you could say it's the jack of all trades, master of none. I'll have to disagree that allowing for non-oop is a flaw, though, simply because nowhere does it say that C++ is an object-orientated language, nor is it best used purely as one.

And, you may be able to simulate objects, polymorphism and the like with a procedural language but ... why on earth would you? :o

Peter: Thanks for the clarification. I've seen the term before, but never by itself. Smile

Ultimately, I still have to recommend C++ over C just as I would recommend C over assembler. Beginning programmers need to worry about using the language, not making the tools necessary to. Going back to memory management, for example. In C, it takes an incredible amount of knowledge and work to be able to make a linked list as generic, safe and fast as the one C++ already provides for you. IMO, beginners should be learning where and when to use a linked list, not how to make one. Granted, such an exercise gives you much insight to things like pointers, but pointers are not as important in C++ as they are in C, consequently, much of the worry over their use - particularly memory leaks and buffer over/underruns - is simply non-existant in C++. Beginner's can worry about program design, as opposed to implementation.
stylin:
Reply
#17
Quote:simply because nowhere does it say that C++ is an object-orientated language, nor is it best used purely as one.
Correct, but one of the main reasons people move to C++ over C is because of the object orientation. Forcing OO would be idiotic though Tongue

The problem with learning C++ first is most tutorials expect you to have a slight amount of knowledge in C first. I tried learning from a C++ tutor a few months back, and most of the stuff was written for someone who already took C.
Reply
#18
Quote:And, you may be able to simulate objects, polymorphism and the like with a procedural language but ... why on earth would you?

Its more about using techniques such as encapsulation and separating the interface from the implementation. These are widely used in object orientated languages, but are just as applicable to procedural languages.

A friend (also doing a Masters degree) and I have been discussing the issue of which language should be taught first in Universities, and have come to the conclusion that it really doesn't matter. I tutor the first year course in programming in Java. We have had a couple of students with delusions of l33tness that have complained with "why do we have to learn Java and not a real language like C/C++". A good computer scientist/programmer should understand the principles of programming and the various paradigms to a point where they can pick up any language in a few days. The computing world moves so quickly that the language you learn in school may be obsolete by the time you make it to the industry. As an example, C# did not exist a few years ago, a company shouldn't have to send its employees back for new language retraining, they should be capable of picking up the documentation and transfering over.

Auckland university here in New Zealand has an assignment that must be written in C, but they never teach it, students are expected to be able to learn it themselves. Some of the better Universities for computer science (cant remember names offhand) teach functional languages (Haskell, SML, etc) rather than imperitive languages. While functional languages are rarely used in industry, the skills learnt translate easily to other languages.

In short learn any language you want, but learn how to program in general rather than learning how to program in a single language specifically. You have no idea what language you will be programming in when you go out an get a job, it may not even have been invented yet ;-)
esus saves.... Passes to Moses, shoots, he scores!
Reply
#19
Quote:@Cha0s: everything you say about OOP, you can do with procedural languages. It's all just a matter of syntax shortcuts and macros.


Quote: sure, you could use a flatheaded screwdriver, and it will get the job done (with more effort, more chances to f*** up), but the "chisel" is made for the job.
Reply
#20
I'd say, learn C++ first. With C++'s std::string class, you won't face such a ridiculously annoying learning curve with C strings.
Simple things like QB's MID$(a$,b,c) are rather difficult in C. I, for one, use shitloads of string manipulation in my programs so it's important that that sort of stuff is easy.
In C++, it would just be a.substr(b, c);

I would, however, not discount C altogether. Learn it when you understand C++ and want to take it to an even lower, closer-to-machine code level.

And yeah, though C++ has greater potential for obfuscated code (though C's obfuscation factor is damn high too), I would argue that a well formatted, object oriented C++ program is MUCH easier to follow and understand than a well formatted C program.

My 2cents

- Eric / neuro
ignatures suck
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)