Advertisement

Is c++ good

Started by July 14, 2014 06:22 PM
30 comments, last by aggieblue92 10 years, 6 months ago

C++ is basically the latin of programming languages. Its usage (outside of games) is getting smaller and smaller but, it is the go to language that a lot of companies still use for programming tests (even for PHP or Java programming jobs).

It is a powerful language but it is also a language that is full of pitfalls and gotchas. It is still used by most AAA companies along with some kind of scipting language but for an indie game like the ones that are advertised in the classifieds they are constrained by small team sizes, finances and time so they will tend to use established games engines that will use a higher level language.


understand C++ can transition to most other languages (expect functional)

Functional programming is just a paradigm and C++11 supports programming in a functional style so why you assume somebody who fully understands C++ would have trouble I don't know.


But it doesn't work the other way. Take someone who knows C#, or Java, or Javascript, and show them some C++ code. They will not understand it.

Theres no reason why somebody who has used any of these languages would not understand C++ code.

I think that it is all alike.

The biggest problem for someone who is new to any of the cited languages is the object oriented design. So the focus should be on the question how can you learn that. With the knowledge of OOD the languages all are quiet easy to use.

Advertisement
Okay thanks everyone.
I'll stick to c++ for a while.
If it Will be too hard i go for c# then to move on later to c++

C++ is still the lingua franca of the AAA space in gamedev, and it's still very popular in smaller-budget / indie titles (except on the web browser), but it's been somewhat displaced by things like Unity (which is probably like 80% of the C# game developers).


C++ is basically the latin of programming languages. Its usage (outside of games) is getting smaller and smaller but, it is the go to language that a lot of companies still use for programming tests (even for PHP or Java programming jobs).

I don't think I've ever been asked a C++ question or asked to write any C++ code for a job that didn't involve C++. Usually it's "X language from the job listing" or "whatever you want".


Functional programming is just a paradigm and C++11 supports programming in a functional style so why you assume somebody who fully understands C++ would have trouble I don't know.

This is a bit un-topical, but C++'s "functional style" doesn't really prepare you all-too-well for full-blown functional programming. Great, you know how map, filter, and reduce work. You're not going to pick up more fundamental things like Lazy evaluation, continuations, or monads.


Theres no reason why somebody who has used any of these languages would not understand C++ code.

This I have to disagree with vehemently. Many of the similarities between C++ and Java/C# (Javascript is a totally different beast) are superficial. Templates are far more powerful, expressive, and hard to figure out than the comparatively simple generics in the aforementioned language. What the hell is a foo<1>? What do you think a java programmer without any experience will do when he sees this? The reference semantics are different too. It's easy to see "std::vector v;" and say "oh, that must be how C++ programmers use new." In most cases, it is. Then they try to return it by reference, and the world breaks. This is assuming you haven't tried to screw with their head by throwing pointers at them.

If I have switch from one language to another I do not try to read something right from the start. It must fail if it goes over the simple control statements and assignements.

I try to make simple programs like the hello world to ask the question "in C++ it is called x and done this way. How is it done in java, C# or any other language".

I learned a few languages before picking up C++ many years ago, but I noticed that after I learned C++, all other languages were much easier to pick up since a lot of concepts in C++ were easy to carry over to other languages.

Advertisement

Theres no reason why somebody who has used any of these languages would not understand C++ code.

I dont know... C++ has an automatic memory management system (RAII) that is quite different from other languages (especially ones needing a GC). Even though developers new to C++ may be able to understand what the C++ code does, I don't know if I would trust that their code is safe and correct.

But I could be wrong. Apple has proven that if you make a language trendy and cool enough (Objective-C), no matter how low level and complex it is*, even beginner developers are very capable and productive regardless. Better still, many beginner developers are quite happily cross compiling to restrictive ARM devices and remote debugging. Something that is quite a step up from what I was doing when I was starting out (VB6) ;)

* no garbage collector (Apple deprecated it), pointers, possible undefined functionality, exposure to C-style memory management.

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


Buster2000, on 15 Jul 2014 - 08:29 AM, said:

Theres no reason why somebody who has used any of these languages would not understand C++ code.

I dont know... C++ has an automatic memory management system (RAII) that is quite different from other languages (especially ones needing a GC). Even though developers new to C++ may be able to understand what the C++ code does, I don't know if I would trust that their code is safe and correct.

I think an experienced coder who has used any language should be able to read the code from almost any other language and be able to fatham what the code is doing. The finer perculiarities of the language syntax maybe not but it shouldn't be too difficult for them to figure out. I am of course talking about an experienced coder and not somebody who has spent a few months learning a little C# and now calls themselves an expert.


Buster2000, on 15 Jul 2014 - 08:29 AM, said:


C++ is basically the latin of programming languages. Its usage (outside of games) is getting smaller and smaller but, it is the go to language that a lot of companies still use for programming tests (even for PHP or Java programming jobs).



I don't think I've ever been asked a C++ question or asked to write any C++ code for a job that didn't involve C++. Usually it's "X language from the job listing" or "whatever you want".

I have by several companies including Microsoft, Facebook and Yahoo. Also outside of the games industry I haven't seen many jobs that say you must know X language. Once you get to a senior position they pretty much all say you must be a full stack developer who can handle any language that we throw at you.

material you'll find for it are for the older version. All the old stuff still works (C++ is very big on maintaining backwards compatibility, which is a source of most of its warts and ugliness)

Imagine what it would be if c++ would not hold the backward compatibility ;/

Then you will have

1) two wersions of c++ in the run (which would will make some to revrite millions of lines probably etc)

2) as the previous c++ would be marked obsolete it would effect in the thing called 'code rot' imo both versions of c++ older and younger will be suffering on this

This is even now present by publicing the changes and staying backward compatible - but if it would drop backward compatibility it would raise much more

(for some case it is fun/silly of standarization comitee to produce different versions of language, the standarization was born exactly to deny the multiplity of close but not compatible versions and problems and space poluttion

that it makes - then standarization comietee was starting

to make those uncompatible verions theyselves ;/ this is

a bit sick) - the one thing that helps with this kind of problems is backward compatibility as you may still use core language (i mean older version and its still alive

same think i dislike the rotting proces of opengl (first ogl version was sentenced rotten to the bone, then we have

the second about wich i cannot be sure will not rot as well

- this makes me feeling a bit disrespectfull to that as i could

respect more some real stable environment and system for decades

One thing I find "difficult" dealing with C++ is that it is a big big monster with different heads. You say "C++" but which one? Every C++ codebase I have come across uses a different subset of the language, completely different coding styles and guidelines.. and the more they add to the language the more this become evident.

More modern languages seem to have a better appreciation about coding standards and the importance to promote a clear style that identifies a language. Java comes with a style both "visually" (where the braces go, how you name things, which case you use) and logically.. with the standard library promoting that style. C# is even more on the same line.. Go is forcing the idea of "the one true way to Go". I have been writing C++ for almost 20 years.. I look at Unreal Engine 4 and my eyes hurt... it;s not nice and it wouldn't happen in a more modern language.

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

This topic is closed to new replies.

Advertisement