Jump to content

What should I learn? C or C++?

Blueprint

Which one is the most useful beneficial?

 

 

Thanks,

Blueprint

Intel i7 4790k / MSI Z97M / Hyper 212 Evo / MSI Twin Frozr GTX 770 / 16GB Corsair Vengeance 1600MHz / Fractal Design Arc Mini R2 / Corsair CS750M / Samsung 840 Evo 250gb SSD /  WD Blue 1TB

Link to comment
Share on other sites

Link to post
Share on other sites

C is the most popular language (source: langpop.com)

Asrock 890GX Extreme 3 - AMD Phenom II X4 955 @3.50GHz - Arctic Cooling Freezer XTREME Rev.2 - 4GB Kingston HyperX - AMD Radeon HD7850 - Kingston V300 240GB - Samsung Spinpoint F3 1TB - Chieftec APS-750 - Cooler Master HAF912 PLUS


osu! profile

Link to comment
Share on other sites

Link to post
Share on other sites

I'm not programming expert from looking online there seems to be more C++(MSDN examples) , personally I'm learning c# atm, with barnacules tutorials.

CPU: Intel 3570 GPUs: Nvidia GTX 660Ti Case: Fractal design Define R4  Storage: 1TB WD Caviar Black & 240GB Hyper X 3k SSD Sound: Custom One Pros Keyboard: Ducky Shine 4 Mouse: Logitech G500

 

Link to comment
Share on other sites

Link to post
Share on other sites

you cant go wrong with any of em pick one

mY sYsTeM iS Not pErfoRmInG aS gOOd As I sAW oN yOuTuBe. WhA t IS a GoOd FaN CuRVe??!!? wHat aRe tEh GoOd OvERclok SeTTinGS FoR My CaRd??  HoW CaN I foRcE my GpU to uSe 1o0%? BuT WiLL i HaVE Bo0tllEnEcKs? RyZEN dOeS NoT peRfORm BetTer wItH HiGhER sPEED RaM!!dId i WiN teH SiLiCON LotTerrYyOu ShoUlD dEsHrOuD uR GPUmy SYstEm iS UNDerPerforMiNg iN WarzONEcan mY Pc Run WiNdOwS 11 ?woUld BaKInG MY GRaPHics card fIX it? MultimETeR TeSTiNG!! aMd'S GpU DrIvErS aRe as goOD aS NviDia's YOU SHoUlD oVERCloCk yOUR ramS To 5000C18

 

Link to comment
Share on other sites

Link to post
Share on other sites

If you don't need to do any object oriented programming C is simpler and handier in some occasions. Otherwise you don't really have a choice, of the two only C++ is object oriented.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

my question is what would be the most versatile language.  

probably C++ out of those.

Computing enthusiast. 
I use to be able to input a cheat code now I've got to input a credit card - Total Biscuit
 

Link to comment
Share on other sites

Link to post
Share on other sites

c++ !

-BUILD-


CPU: INTEL I5 4690K GRAPHICS CARD: GIGABYTE 970 G1 2.5GB CASE: NZXT S340|BLACK MOBO: MSI Z97S KRAIT EDITION CPU COOLER: CORSAIR H100i 


 RAM: HYPERX FURY 2X4GB|WHITE PSU: CORSAIR RM850 850W FULLY MODULAR STORAGE: 1TB WD BLUE HDD OS: WINDOWS 8.1

Link to comment
Share on other sites

Link to post
Share on other sites

Depends on what you are gonna do. C# is of course also very useful. 

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

Ok thanks guys.

Intel i7 4790k / MSI Z97M / Hyper 212 Evo / MSI Twin Frozr GTX 770 / 16GB Corsair Vengeance 1600MHz / Fractal Design Arc Mini R2 / Corsair CS750M / Samsung 840 Evo 250gb SSD /  WD Blue 1TB

Link to comment
Share on other sites

Link to post
Share on other sites

Personally I'd start with something simpler like C# or Java. That's not to say that C# or Java are less complicated languages than C or C++, they are suited for different purposes. I'd say C# and Java are more general purpose languages whereas C and C++ are more useful in applications where performance is key, at the sacrifice of ease of maintenance. C# and Java can teach you the basics of programming without hammering home syntax and pointers and things like that, they are much more forgiving for a beginner, whereas C and C++ require you to have a more intimate knowledge of the language (such as pointers) to do something that would be relatively simple in C# or Java. On the other hand, C or C++ experience is in my opinion a must-have as that intimate knowledge of the language is very applicable to even other languages in understanding how they work, but only after a year or two of C#/Java or maybe even Python so you have some programming skills already.

 

That's more of just a train of thought, the point I really want to make is that when starting out I think it's better to gain an understanding of programming techniques such as the importance of coding style (such as naming and spacing), program structure (such as object oriented or procedural) and other best practices rather than having to jump through language specific hoops to even start to write a program and I think that C# and Java enable this much more so than C or C++.

Link to comment
Share on other sites

Link to post
Share on other sites

Learn C using K&R

Then you can learn C++, C# and Java easily

Muh rig: i7 4770k, Cooler Master Hyper 212 Evo, MSI Z87 G45, Kingston Hyper X Blu 8GB, Samsung 840 EVO 120 + WD Blue 1 TB, Asus GTX 770 2GB, Corsair 200r + 2x Corsair AF 120 Blue + 1x Stock corsair fan, Corsair TX650, LG 27EA33V IPS, Steelseries Sensei Raw + QCK mini, CM Quickfire Ultimate Blue.

Link to comment
Share on other sites

Link to post
Share on other sites

Neither. Use Go or Rust. Go if you like C's structured paradigm, Rust if you like object orientation and need pointers (embedded stuff).

 

C is an archaic tool that was once beautiful but is now archaic.

 

C++ is bloated, slow, ugly, and generally awful. It's the Windows of programming languages. Some day people will become mad about an update and everyone will switch and then realize it wasn't that great to begin with.

Link to comment
Share on other sites

Link to post
Share on other sites

Neither. Use Go or Rust. Go if you like C's structured paradigm, Rust if you like object orientation and need pointers (embedded stuff).

 

C is an archaic tool that was once beautiful but is now archaic.

 

C++ is bloated, slow, ugly, and generally awful. It's the Windows of programming languages. Some day people will become mad about an update and everyone will switch and then realize it wasn't that great to begin with.

C is used all the time for many different things. And C++ is not slow in any way shape or form, you can actually write inline asm in C++. Don't spread misinformation.

Link to comment
Share on other sites

Link to post
Share on other sites

Neither. Use Go or Rust. Go if you like C's structured paradigm, Rust if you like object orientation and need pointers (embedded stuff).

 

C is an archaic tool that was once beautiful but is now archaic.

 

C++ is bloated, slow, ugly, and generally awful. It's the Windows of programming languages. Some day people will become mad about an update and everyone will switch and then realize it wasn't that great to begin with.

Good one. C++ is what most demanding calculations including shaders use/are based on. What's next? HTML is a programming language?

Link to comment
Share on other sites

Link to post
Share on other sites

Personally I'd start with something simpler like C# or Java. That's not to say that C# or Java are less complicated languages than C or C++, they are suited for different purposes. I'd say C# and Java are more general purpose languages whereas C and C++ are more useful in applications where performance is key, at the sacrifice of ease of maintenance. C# and Java can teach you the basics of programming without hammering home syntax and pointers and things like that, they are much more forgiving for a beginner, whereas C and C++ require you to have a more intimate knowledge of the language (such as pointers) to do something that would be relatively simple in C# or Java. On the other hand, C or C++ experience is in my opinion a must-have as that intimate knowledge of the language is very applicable to even other languages in understanding how they work, but only after a year or two of C#/Java or maybe even Python so you have some programming skills already.

 

That's more of just a train of thought, the point I really want to make is that when starting out I think it's better to gain an understanding of programming techniques such as the importance of coding style (such as naming and spacing), program structure (such as object oriented or procedural) and other best practices rather than having to jump through language specific hoops to even start to write a program and I think that C# and Java enable this much more so than C or C++.

 

I think this is good advice. C/C++ is a lower level language that allows you to write code closer to the hardware. While this is a really good thing, it makes it a hell of a lot harder to learn as a first language. Even simple things can throw you off like how C will allow you to reference array locations outside the bounds of your defined array. Java will give you an error while C/C++ will just give you undefined behavior which could crash or could give you a random result from somewhere located in memory.

Rig: i7 2600K @ 4.2GHz, Larkooler Watercooling System, MSI Z68a-gd80-G3, 8GB G.Skill Sniper 1600MHz CL9, Gigabyte GTX 670 Windforce 3x 2GB OC, Samsung 840 250GB, 1TB WD Caviar Blue, Auzentech X-FI Forte 7.1, XFX PRO650W, Silverstone RV02 Monitors: Asus PB278Q, LG W2243S-PF (Gaming / overclocked to 74Hz) Peripherals: Logitech G9x Laser, QPad MK-50, AudioTechnica ATH AD700

Link to comment
Share on other sites

Link to post
Share on other sites

I started with C++.

Dove right in there and learned OOP and pointers all at the same time.

From there moving to C, Java, or pretty much any other language is a breeze.

Link to comment
Share on other sites

Link to post
Share on other sites

First C.. Then C++. By learning C first you get to learn inside and out memory handling better than starting with C++. 

 

Acer 23" H236HL | Intel core i7 - 4770 | MSI H81M-P33 | Apacer 8GB DDR3 @ 1600Mhz | MSI Twin Frozr GTX760 OC | Western Digital 1TB Blue | Seasonic Eco 500W |Logitech Wireless mouse & Keyboard | Creative SBS 370 2.1 | Logitech Extreme 3D Pro Joystick

Link to comment
Share on other sites

Link to post
Share on other sites

First C.. Then C++. By learning C first you get to learn inside and out memory handling better than starting with C++. 

^ Took the words outta my mouth.

Link to comment
Share on other sites

Link to post
Share on other sites

C is used all the time for many different things. And C++ is not slow in any way shape or form, you can actually write inline asm in C++. Don't spread misinformation.

Writing inline asm is a bad idea though. You misinterpreted me (haha programming joke nvm). C++ is slower to write and it has more overhead in comparison to C, especially when running garbage collected.

 

Good one. C++ is what most demanding calculations including shaders use/are based on. What's next? HTML is a programming language?

That doesn't mean it's good or that it's the best solution for that. When pure speed is necessary straight C is often a better choice or even possibly Go these days.

 

And no, HTML is not a programming language. It's a markup language. Strangely enough though HTML5 and CSS3 are Turing complete...

Link to comment
Share on other sites

Link to post
Share on other sites

Writing inline asm is a bad idea though. You misinterpreted me (haha programming joke nvm). C++ is slower to write and it has more overhead in comparison to C, especially when running garbage collected.

 

That doesn't mean it's good or that it's the best solution for that. When pure speed is necessary straight C is often a better choice or even possibly Go these days.

 

And no, HTML is not a programming language. It's a markup language. Strangely enough though HTML5 and CSS3 are Turing complete...

It may be faster to write programs in Go, but I have not found one website which says Go is the language of choice for performance.

Starting from official google paper from 2011 to more recent, late 2013 tests  or a very informative StackOverflow answer here. I know all 3 are great languages, but at least in the industry I am after, pretty much all major developments are C++, simply because real-time performance matters the most.

Link to comment
Share on other sites

Link to post
Share on other sites

First C.. Then C++. By learning C first you get to learn inside and out memory handling better than starting with C++. 

 

^ Took the words outta my mouth.

 

Just make sure that when you learn C++, you write idiomatic C++. Idiomatic C is not the same as idiomatic C++. The idioms are quite a bit different. You'll commonly see pointers that are void* or casts like (int)someVar. You should never do either thing in C++.

 

That's why I encourage people to learn C++ before they learn C. C is pretty much a subset of C++, but it has more elastic idioms. So learning a more restrictive language like C++ first actually builds better habits rather than doing the opposite. Learning C first can actually result in writing pretty poor C++.

 

 

It may be faster to write programs in Go, but I have not found one website which says Go is the language of choice for performance.

Starting from official google paper from 2011 to more recent, late 2013 tests  or a very informative StackOverflow answer here. I know all 3 are great languages, but at least in the industry I am after, pretty much all major developments are C++, simply because real-time performance matters the most.

 
While Go may be good for performance, it's a garbage collected language. GC has its own unique problems. It's more of a hassle, but sometimes safer to pick a language that requires that you manually manage your memory, or one with RAII (such as C++ or Rust). If you're interested in a newer language, definitely check out Rust. It blows Go out of the water and it allows you to do a lot of things you can do in C++. It's still in its infancy so it has some performance issues, but it uses LLVM as the back-end so it benefits from some pretty good optimizations. It's shown to match C++ in quite a few benchmarks.
Link to comment
Share on other sites

Link to post
Share on other sites

I would start with python -- it's very flexible and can do a lot with very little code.

I do not feel obliged to believe that the same God who has endowed us with sense, reason and intellect has intended us to forgo their use, and by some other means to give us knowledge which we can attain by them. - Galileo Galilei
Build Logs: Tophat (in progress), DNAF | Useful Links: How To: Choosing Your Storage Devices and Configuration, Case Study: RAID Tolerance to Failure, Reducing Single Points of Failure in Redundant Storage , Why Choose an SSD?, ZFS From A to Z (Eric1024), Advanced RAID: Survival Rates, Flashing LSI RAID Cards (alpenwasser), SAN and Storage Networking

Link to comment
Share on other sites

Link to post
Share on other sites

Most companies now days are looking for .Net developers so that everything can be mobile and easily shared...

 

With that said, any programming language is a good starting point, in the end they are all equivalent and the difference in performance is usually irrelevant.

 

As mentioned a few other times, I would start with Python as it is relatively high level and allows you to implement things quickly and debug easily.

 

If performance is your goal or you want more low level control than C is the best choice.

Link to comment
Share on other sites

Link to post
Share on other sites

Writing inline asm is a bad idea though. You misinterpreted me (haha programming joke nvm). C++ is slower to write and it has more overhead in comparison to C, especially when running garbage collected.

 

That doesn't mean it's good or that it's the best solution for that. When pure speed is necessary straight C is often a better choice or even possibly Go these days.

 

And no, HTML is not a programming language. It's a markup language. Strangely enough though HTML5 and CSS3 are Turing complete...

Writing inline asm is not a bad idea. Also I did not misinterperet you. You miss-typed. If you meant that C++ is slow to write, then you are still wrong for the same reason. Its only slow if you are bad at it. And C++ does not intrisically have more overhead than C, you can write a program that compiles in either and they will be equally fast.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×