Jump to content




Want to learn C++ ?


34 replies to this topic

#21 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 29 May 2013 - 10:06 AM

View PostMads, on 29 May 2013 - 09:58 AM, said:

Shit, I'm about to puke so bad right now.
Why because Adobe Flash was mentioned, or because Apple was mentioned?

View PostShadowedZenith, on 29 May 2013 - 09:59 AM, said:

You SHOULD always code natively, doesn't change the fact that there are other options and doesn't change the fact that, at least last I heard, Apple accepts applications written in other languages than Objective-C.
So if you're saying people should code natively, then why are you also saying there are other (worse) options out there, seems a little contradictory. Last I heard (about 3-6 months ago) Apple was starting to reject them due to the deteriorating quality.

View PostDlcruz129, on 29 May 2013 - 10:02 AM, said:

I thought Windows was written in C++ and Assembly, though?
Hahahaha... Windows, written in Assembly, no.

View PostShadowedZenith, on 29 May 2013 - 10:06 AM, said:

If you're looking for the most performance, Assembly or C/C++ is the best way to go with Windows.
And thats not because Windows is written in C++ or Assembly, it is because Assembly or C++ is best for performance on any computer system.

EDIT: Fun fact, in about 5 or so years we will all be programming in JavaScript as it will be much faster than any other code out there. Reason: there is a new chip that has been released (currently version 1.0) that its sole purpose is to process HTML DOM and JS. Making it faster than anything else that has to share the CPU.

Edited by theoriginalbit, 29 May 2013 - 10:09 AM.


#22 D3matt

  • Members
  • 830 posts

Posted 29 May 2013 - 10:10 AM

Windows is written in C/C++, C#, and some assembly. http://social.micros...40-148e6b3da9f1

#23 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 29 May 2013 - 10:12 AM

View Posttheoriginalbit, on 29 May 2013 - 10:06 AM, said:

View PostDlcruz129, on 29 May 2013 - 10:02 AM, said:

I thought Windows was written in C++ and Assembly, though?
Hahahaha... Windows, written in Assembly, no.

Wikipedia said:

Programmed in C, C++ and Assembly language[1]

EDIT: These ninjas...

#24 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 29 May 2013 - 10:15 AM

What are the best video tutorials for C++? I've found I learn more from watching people than sitting down and reading a book.

#25 ShadowedZenith

  • Members
  • 95 posts
  • LocationComputational Soup of the Cloud

Posted 29 May 2013 - 10:16 AM

View Posttheoriginalbit, on 29 May 2013 - 10:06 AM, said:

View PostMads, on 29 May 2013 - 09:58 AM, said:

Shit, I'm about to puke so bad right now.
Why because Adobe Flash was mentioned, or because Apple was mentioned?

View PostShadowedZenith, on 29 May 2013 - 09:59 AM, said:

You SHOULD always code natively, doesn't change the fact that there are other options and doesn't change the fact that, at least last I heard, Apple accepts applications written in other languages than Objective-C.
So if you're saying people should code natively, then why are you also saying there are other (worse) options out there, seems a little contradictory. Last I heard (about 3-6 months ago) Apple was starting to reject them due to the deteriorating quality.

View PostDlcruz129, on 29 May 2013 - 10:02 AM, said:

I thought Windows was written in C++ and Assembly, though?
Hahahaha... Windows, written in Assembly, no.

View PostShadowedZenith, on 29 May 2013 - 10:06 AM, said:

If you're looking for the most performance, Assembly or C/C++ is the best way to go with Windows.
And thats not because Windows is written in C++ or Assembly, it is because Assembly or C++ is best for performance on any computer system.

EDIT: Fun fact, in about 5 or so years we will all be programming in JavaScript as it will be much faster than any other code out there. Reason: there is a new chip that has been released (currently version 1.0) that its sole purpose is to process HTML DOM and JS. Making it faster than anything else that has to share the CPU.

I'm suggesting that there are other available languages outside of Objective-C because the way you worded your post made it sound like there was absolutely no other options, even though right there are two valid (though likely not optimal) options.

#26 TomyLobo

  • Members
  • 42 posts

Posted 29 May 2013 - 10:17 AM

View PostETHANATOR360, on 27 May 2013 - 10:17 AM, said:

i would like to learn C stuff first but what the heck
bad idea. C++ is a different language.

#27 Mads

  • Members
  • 604 posts
  • LocationCopenhagen, Denmark

Posted 29 May 2013 - 10:19 AM

View Posttheoriginalbit, on 29 May 2013 - 10:06 AM, said:

View PostMads, on 29 May 2013 - 09:58 AM, said:

Shit, I'm about to puke so bad right now.
Why because Adobe Flash was mentioned, or because Apple was mentioned?

Because people are stupid enough to think that you have to write in Objective-C for Apple, and that you cannot write code in any other language, which can be compiled to run natively.

#28 M4sh3dP0t4t03

  • Members
  • 255 posts
  • LocationGermany

Posted 29 May 2013 - 10:37 AM

View Posttheoriginalbit, on 29 May 2013 - 10:06 AM, said:


EDIT: Fun fact, in about 5 or so years we will all be programming in JavaScript as it will be much faster than any other code out there. Reason: there is a new chip that has been released (currently version 1.0) that its sole purpose is to process HTML DOM and JS. Making it faster than anything else that has to share the CPU.
I don't think so, because noone knows what progress will be made with x86 chips in the next few years. Also you would need to rewrite lots of stuff because the interpreters for all coding languages would have to work different.

And assembly language is ALWAYS the fastest, because it interacts directly with the hardware and doesn't need an interpreter.

#29 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 29 May 2013 - 01:14 PM

View PostTomyLobo, on 29 May 2013 - 10:17 AM, said:

View PostETHANATOR360, on 27 May 2013 - 10:17 AM, said:

i would like to learn C stuff first but what the heck
bad idea. C++ is a different language.
C++ was designed in such a way that C is a valid subset of C++. With other words, every C program is valid C++ as well. There are only a couple of incompatibilities and those are nicely listed here: http://en.wikipedia....ty_of_C_and_C++ . So to say that C++ is a different language (which it literally is, but that's not what you ment) isn't true. You can perfectly learn C first to get the hang of most of C-style syntax and the procedural paradigm without bothering about object orientation and exra syntax. If you ask me, C (and assembly certainly too) is perfect to learn real technical programming. It can make you grasp pointers, memory management, the stack, etc. If you proceed to C++, C#, Objective-C after that, you can be confident that you really understand what's going on on the lower levels and how you can control a program in every aspect. I'm not saying that you couldn't learn this through C++ (we did so at Uni), but I've seen many dive into C++ (or especially C#) and a lot of them avoided the low-level stuff because they could make their way around (with the logical inefficiency problems etc. of course) and they didn't really understand what was happening under the hood.

Also, lots of microcontrollers (like the Arduino) natively use very close variants of C or even C itself and practically never C++ or anything else.

All these languages have the C language in common, so learning pure C can greatly help you to see how other languages build onto that, thus mastering those languages more quickly.

#30 TomyLobo

  • Members
  • 42 posts

Posted 29 May 2013 - 01:24 PM

View PostOrwell, on 29 May 2013 - 01:14 PM, said:

View PostTomyLobo, on 29 May 2013 - 10:17 AM, said:

View PostETHANATOR360, on 27 May 2013 - 10:17 AM, said:

i would like to learn C stuff first but what the heck
bad idea. C++ is a different language.
C++ was designed in such a way that C is a valid subset of C++. With other words, every C program is valid C++ as well. There are only a couple of incompatibilities and those are nicely listed here: http://en.wikipedia....ty_of_C_and_C++ . So to say that C++ is a different language (which it literally is, but that's not what you ment) isn't true. You can perfectly learn C first to get the hang of most of C-style syntax and the procedural paradigm without bothering about object orientation and exra syntax. If you ask me, C (and assembly certainly too) is perfect to learn real technical programming. It can make you grasp pointers, memory management, the stack, etc. If you proceed to C++, C#, Objective-C after that, you can be confident that you really understand what's going on on the lower levels and how you can control a program in every aspect. I'm not saying that you couldn't learn this through C++ (we did so at Uni), but I've seen many dive into C++ (or especially C#) and a lot of them avoided the low-level stuff because they could make their way around (with the logical inefficiency problems etc. of course) and they didn't really understand what was happening under the hood.

Also, lots of microcontrollers (like the Arduino) natively use very close variants of C or even C itself and practically never C++ or anything else.

All these languages have the C language in common, so learning pure C can greatly help you to see how other languages build onto that, thus mastering those languages more quickly.
No one who knows what they're talking about will recommend you to learn C in order to learn C++.
Here's a factoid from a bot fed by such people:

[20:23:15] <nolyc> Learning C++ requires no previous C knowledge and many C style ways of doing things are replaced by better or equivalent language additions. A good C++ book will look very different from a good C book. However, if you do know C already, it is evident that reading The C++ programming language by Bjarne Stroustrup gives you a very solid understanding of C++.

#31 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 29 May 2013 - 01:41 PM

View PostTomyLobo, on 29 May 2013 - 01:24 PM, said:

View PostOrwell, on 29 May 2013 - 01:14 PM, said:

* snip! *
No one who knows what they're talking about will recommend you to learn C in order to learn C++.
Here's a factoid from a bot fed by such people:

[20:23:15] <nolyc> Learning C++ requires no previous C knowledge and many C style ways of doing things are replaced by better or equivalent language additions. A good C++ book will look very different from a good C book. However, if you do know C already, it is evident that reading The C++ programming language by Bjarne Stroustrup gives you a very solid understanding of C++.</nolyc>
I never said that you needed C to learn C++. All my arguments say that C forces you more to learn the low-level stuff of programming than C++ does. It's mainly because of how C++ implements things better that it makes it able to ignore certain technical aspects of programming. And it's even a lot more relevant for languages as C#.

Basically, that quote exactly states my point. Good C++ is different from good C. C++ is more intuitive, flexible, productive, etc. But certainly with the C++11 standard now; being able to use the 'auto' keyword everywhere makes it easy to neglect everything that's happening under the hood.

Again, while I believe it's more likely to do so in C, I'm not saying that you can't learn in-depth programming in C++. I remember the exam of one of the advanced programming courses on C++ we had. We got a small C++ program of about 50 lines (function calls, instantiation and some local scopes mainly) and the source of all the classes that were being used in the code. Then we had to write down the entire stacktrace this program would produce. Those are good excercises, but I doubt a lot of people are doing that in their spare time...

Also, that book you're citation refers to is the same I recommended at the beginning of this thread. :) Good book! ;)

#32 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 29 May 2013 - 01:50 PM

View PostKingOfNoobs, on 29 May 2013 - 10:37 AM, said:

And assembly language is ALWAYS the fastest, because it interacts directly with the hardware and doesn't need an interpreter.
A lot of languages like C and C++ (and hundreds of others) aren't interpreted at all but are compiled directly to machine code (which is equivalent to asm). So that's not entirely true. And even though efficiency would still be slightly better in assembly, the productivity of other languages totally outbalance asm.

#33 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 29 May 2013 - 06:47 PM

View PostKingOfNoobs, on 29 May 2013 - 10:37 AM, said:

I don't think so, because noone knows what progress will be made with x86 chips in the next few years. Also you would need to rewrite lots of stuff because the interpreters for all coding languages would have to work different.

And assembly language is ALWAYS the fastest, because it interacts directly with the hardware and doesn't need an interpreter.
Not much more progress can be made with the silicon chip, they are starting to hit the limit of physics, there is only so small they can go, and its called an atom. However gold connections need to be 2 atoms. That is the limitation of silicon. Yes we can go to the graphene chip, and we eventually will, but there are safety concerns with it atm that they are trying to overcome.

As it stands (excluding assembly) C/C++ is the language that runs fastest on our modern day computers. However the C/C++ program still needs to share the CPU with everything else, this is where the separate chip comes in and makes processing DOM quicker, it doesn't need to take up time in the CPU and share it with anything else, it will have its own dedicated chip!

#34 ShadowedZenith

  • Members
  • 95 posts
  • LocationComputational Soup of the Cloud

Posted 29 May 2013 - 07:57 PM

View Posttheoriginalbit, on 29 May 2013 - 06:47 PM, said:

View PostKingOfNoobs, on 29 May 2013 - 10:37 AM, said:

I don't think so, because noone knows what progress will be made with x86 chips in the next few years. Also you would need to rewrite lots of stuff because the interpreters for all coding languages would have to work different.

And assembly language is ALWAYS the fastest, because it interacts directly with the hardware and doesn't need an interpreter.
Not much more progress can be made with the silicon chip, they are starting to hit the limit of physics, there is only so small they can go, and its called an atom. However gold connections need to be 2 atoms. That is the limitation of silicon. Yes we can go to the graphene chip, and we eventually will, but there are safety concerns with it atm that they are trying to overcome.

As it stands (excluding assembly) C/C++ is the language that runs fastest on our modern day computers. However the C/C++ program still needs to share the CPU with everything else, this is where the separate chip comes in and makes processing DOM quicker, it doesn't need to take up time in the CPU and share it with anything else, it will have its own dedicated chip!

They already have chips that allow you to offload processes onto separate, dedicated processors. They're called FPGA (field-programmable gate arrays). Pretty sure you could easily program one to handle a dedicated JS/DOM/HTML hardware implementation. Though, I'd really love to see your source for your claim that there's a chip already produced to run JS at a native level. I tried googling it and turned up nothing.

#35 TomyLobo

  • Members
  • 42 posts

Posted 30 May 2013 - 08:09 AM

and you bet it would show up on google if theoriginalbit knew about it (and wasn't breaking his NDA by telling us)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users