Register for your free account! | Forgot your password?

You last visited: Today at 22:14

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



C++ ?

Discussion on C++ ? within the C/C++ forum part of the Coders Den category.

Reply
 
Old 12/09/2011, 16:13   #16
 
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
Quote:
Originally Posted by Dr. Coxxy View Post

made me laugh, but it works, doesnt it?
Also works , but wouldn't you prefer a car? :>

Quote:
Example:
Attiny45 µC, 4k flash, 256b EEPROM, no filesystem.
I knew that was coming. Programming for microcontroller is something completly different and shouldn't be part of this discussion. And seriously, how many normal C-books cover that?

Quote:
ok, you dont need c in c++...
i knew youre an idiot.
Ye, gimme an example and please not microcontroller(or something similar) again.
MoepMeep is offline  
Thanks
1 User
Old 12/09/2011, 16:52   #17
 
Dr. Coxxy's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 1,206
Received Thanks: 736
most c books cover that.
because most c books arent layed out for windows, linux or generally 32/64 bit.


you cant compare that.
obviously only use the goto solution if its not significantly slower than the 'normal' solution.


and why µCs shouldnt be part of this discussion?
you learn to code fast&&||small code when youve only limited hardware opportunities.

got no example for File class if you dont want to optimize or have limited hardware capabilities, but anyway go on using something you dont understand.

and yes you need c in c++, to let me quote you:
Quote:
Everyone who can code C++ can code C.
if you haven't learned c properly you (obviously) can't code in c++.
Dr. Coxxy is offline  
Old 12/09/2011, 17:21   #18
 
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
Quote:
Originally Posted by Dr. Coxxy View Post
most c books cover that.
because most c books arent layed out for windows, linux or generally 32/64 bit.

and why µCs shouldnt be part of this discussion?
you learn to code fast&&||small code when youve only limited hardware opportunities.
Quote:
got no example for File class if you dont want to optimize or have limited hardware capabilities, but anyway go on using something you dont understand.
You are getting funny. I got no problem writing pure c-code, but I prefer C++(well, C++ with some C functions I prefer for private use).

Quote:
and yes you need c in c++, to let me quote you:
if you haven't learned c properly you (obviously) can't code in c++.
You are probably not capable of understanding this, but when not using OOP in C++ it basicly 'looks' like C(different function names etc ofcoz, some lil differences...). So the step from C++ to C is just a little one. In fact, its different function names and no more classes(and few more lil things ofcoz, but that always happens when changing language).

Going from OOP language to OOP language -> No problem.
OOP(C++) to procedural -> No problem.
OOP(C#,java...) to procedural -> Could be a problem.
procedural -> OOP(C++) -> Crap code no problem, good code can be 'hard'.
procedural -> OOP(C#,java) -> 'Hard'.

As you see, a real C++-Coder(not that 12years old kid) which knows OO and procedural programming won't have any problem going to C.
A C coder can easily produce procedural code in C++, but when it comes to classes -> fail.

But before we keep doing this. Do you have several years experience in C and C++? Otherwise this is even more timewasting.

Quote:
you cant compare that.
obviously only use the goto solution if its not significantly slower than the 'normal' solution.
Wasn't referring to the speed. But to get it clear for you: Works. But wouldn't you prefer a hot chick? :>
MoepMeep is offline  
Old 12/09/2011, 17:37   #19
 
Dr. Coxxy's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 1,206
Received Thanks: 736
Quote:
A C coder can easily produce procedural code in C++, but when it comes to classes -> fail.
i guess you can say that by your years of experience in knowing good C-coders...

Quote:
OOP(C++) to procedural -> No problem.
sry most c++ coders who havent learned a procedural language properly (c in this case...), will get lost after they cant use their uber classes...
though its a requirement for a c++ coder to have learned c... so yes it is easy - if he can code c++ properly = he learned c first.

Quote:
oh good, i prefer my small && fast c-code and you can go with your overloaded c++, fine?

and as i already said, i have nothing against c++, but you should learn c proper before you go over to c++.
Dr. Coxxy is offline  
Old 12/09/2011, 18:33   #20
 
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
Quote:
Originally Posted by Dr. Coxxy View Post
i guess you can say that by your years of experience in knowing good C-coders...
A C-coder who never did OOP before will have problems with classes. FACT.

Quote:
sry most c++ coders who havent learned a procedural language properly (c in this case...), will get lost after they cant use their uber classes...
though its a requirement for a c++ coder to have learned c... so yes it is easy - if he can code c++ properly = he learned c first.
C++ is procedural too. win.

Quote:
oh good, i prefer my small && fast c-code and you can go with your overloaded c++, fine?

and as i already said, i have nothing against c++, but you should learn c proper before you go over to c++.
Nope, did procedural c++ first :>
MoepMeep is offline  
Old 12/09/2011, 19:21   #21
 
Dr. Coxxy's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 1,206
Received Thanks: 736
Quote:
C++ is procedural too. win.
yep but most c++ books dont teach the procedural way.
they only introduce with it like 1/5 of the book (yes, that is not enough), or they require that youve learned C first.
if you learned it properly - congratz.
havent seen a so called 'c++ book' which covered the basics properly.
Dr. Coxxy is offline  
Old 12/09/2011, 20:10   #22


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Quote:
Originally Posted by Dr. Coxxy View Post
flamewar just begun.
just opened one of my C-books at random position and first thing i see is a chapter about heap fragmention.
sorry, but i never saw a c++ book which handles things like this.
because its not necessary.
do you even read my posts?
i dont think so, otherwise you would not call it flamewar.
Quote:
goto is shit?
yes it CAN be shit if used wrong...
yes and therefore it is.
Quote:
all these things are not fault of the language c++, but c++ books, tuts or whatsoever tend to ignore those...
the language is not bad, because so many noobs write tutorials and books.
they also exist for C.
Quote:
and sorry you cant use the c++ file class everywhere...
you can.
Quote:
and just to repeat, its not the fault of the language c++ (since its superior to c as a language...), but fault of the ppl who write c++ books and say 'heres everything you need, you dont need to learn c, c++ is BETTER' and then fill 1/5 of the book with some C-basics and continue with the object orientation without teaching them c properly.
because they DONT HAVE TO teach them c properly, only the procedural part of c++.

Quote:
most c books cover that.
because most c books arent layed out for windows, linux or generally 32/64 bit.
i dont see a reason why a book should cover microcontrollers.

you just dont understand programming o.ô highlevel languages were designed to abstract the hardware!!
if you want to program microcontrollers, you learn asm and buy a book which covers programming them with C/C++ and ASM.
you DONT have to learn it in a normal real-world beginner book.

If you think a programmer has to know that, you're really uninformed. Of course he should have a basic understanding of the hardware, but he does not need to know how to program a microcontroller for that.

It's just the basic concept of labor division and only knowing that you have to know.
A system developer reads books you have mentioned. But why should one who just wants to learn programming learn something about hardware programming?
That would be ridiculous.

And if you learned C++ and want to develope systems or program hardware: There is no problem. You can do it in C++ (if you want, in the procedural part only) and there would be no problem to learn the needed C stuff.
If one is really not able to deal with it and can only survive with classes, I dont call him a good C++ programmer, thats it. Therefore your whole argumentation is invalid.

So again:
Learning C++ first does not fuck up your style.
Learning C first does, if you want to program "normal" applications.

(Moep explained it very well)

Quote:
got no example for File class if you dont want to optimize or have limited hardware capabilities, but anyway go on using something you dont understand.
Yeah. Go on insulting good programmers, just because they like classes.
Seriously, your whole argumentation style is crap.

OF COURSE you can only use the file class where it is implemented. You can only use the C standard on systems where it is implemented as well!
And the class also supports raw data manipulation, so there is no real overhead.

Quote:
sry most c++ coders who havent learned a procedural language properly (c in this case...), will get lost after they cant use their uber classes...
Most C coders are getting lost in the new and very common OOP world
Of course, it is a generalization, as yours is.

Quote:
i guess you can say that by your years of experience in knowing good C-coders...
No, but by reading about others' experiences.

Quote:
and as i already said, i have nothing against c++, but you should learn c proper before you go over to c++.
no, not if you dont need it.

Quote:
yep but most c++ books dont teach the procedural way.
they only introduce with it like 1/5 of the book (yes, that is not enough), or they require that youve learned C first.
if you learned it properly - congratz.
havent seen a so called 'c++ book' which covered the basics properly.
Well, I begin to believe you dont even read books...especially no C++ books.
MrSm!th is offline  
Old 12/09/2011, 20:54   #23
 
Dr. Coxxy's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 1,206
Received Thanks: 736
i just think we talk past each other...
anyway, just my opinion that you should learn c first before learning c++ cause c++ books dont explain the procedural way properly and if you dont understand the basics you dont need to learn object orientation but...
nvm
gl & hf
Dr. Coxxy is offline  
Thanks
1 User
Old 12/09/2011, 21:00   #24
 
xNopex's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 827
Received Thanks: 471
The whole discussion is nonsense. Generally, neither C++ is better than C nor C is better than C++. There are some situations when you should prefer C and there are some situations in which you should prefer C++ and there are also situations when you really should use another programming language. A high skilled programmer is able to decide which language fits the best for a specific task.
So there is no 'bad' programming language [Apart from VB.NET (and only because of its syntax ]. There are only bad programmers who have chosen the wrong language for a specific task.
xNopex is offline  
Thanks
1 User
Old 12/09/2011, 21:37   #25


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Quote:
Originally Posted by xNopex View Post
The whole discussion is nonsense. Generally, neither C++ is better than C nor C is better than C++. There are some situations when you should prefer C and there are some situations in which you should prefer C++ and there are also situations when you really should use another programming language. A high skilled programmer is able to decide which language fits the best for a specific task.
So there is no 'bad' programming language [Apart from VB.NET (and only because of its syntax ]. There are only bad programmers who have chosen the wrong language for a specific task.
Did you even read it? The whole discussion was not about the better language.
Quote:
Originally Posted by Dr. Coxxy View Post
i just think we talk past each other...
anyway, just my opinion that you should learn c first before learning c++ cause c++ books dont explain the procedural way properly
gl & hf
yeah and you're wrong.
MrSm!th is offline  
Reply




All times are GMT +1. The time now is 22:14.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.