• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

what has changed to C++? back to programming

Randall

Active Member
Joined
Aug 1, 2007
Messages
17
Reaction score
25
Hello
A long time ago I programmed in C++ but it was somewhere 10 years ago or more. I would like to know if the habits in this programming language have changed. Do you still use new and delete operators? I also saw that the colon " : " is used in the for loop. The auto keyword appeared, but I think I already know what it's about.

Can someone briefly and simply describe to me what I need to learn?
 

mrianura

Active Member
Joined
Jan 31, 2015
Messages
37
Reaction score
30
It doesn't really matter that much. Newer standards are compatible with the older, you can do as you did before and discover new possibilities during the process.
What :D Comparing C++98 to C++20 practices is like comparing ant to Elephant. For range loops, better type deducing, perfect forwarding, smart pointers, almost everything should be done differently than in C++98.
 

kay

Legendary OT User
Joined
Apr 23, 2013
Messages
851
Solutions
9
Reaction score
1,090
Location
32316,31942,7
YouTube
TibiantisOnline
What :D Comparing C++98 to C++20 practices is like comparing ant to Elephant. For range loops, better type deducing, perfect forwarding, smart pointers, almost everything should be done differently than in C++98.

I'm not comparing anything and there is no "should" in that matter unless you work for a company that forces the newest standards for some reason. It's not like C++ has changed completly over the past 10 years. If anything, you may want to get more familiar with C++11, which is exactly 10 years old now, and which you eventually would do by the way, if you just started doing things again (speaking of a hobbyist). The further versions are not widely adopted, and probably won't be for a while yet. Not to mention C++20 which hasn't even been published when this thread was posted lol
 
Last edited:

4Nathu4

valoria.online
Joined
Oct 27, 2009
Messages
247
Solutions
8
Reaction score
141
GitHub
4mrcn4
I'm not comparing anything and there is no "should" in that matter unless you work for a company that forces the newest standards for some reason. It's not like C++ has changed completly over the past 10 years. If anything, you may want to get more familiar with C++11, which is exactly 10 years old now, and which you eventually would do by the way, if you just started doing things again (speaking of a hobbyist). The further versions are not widely adopted, and probably won't be for a while yet. Not to mention C++20 which hasn't even been published when this thread was posted lol
🤭
The user asked for nuances and you in your previous post clearly indicated that there is nothing to worry/be excited about, which is not true.

@thread
Lambda expressions, nullptr's, automatic type deduction of objects, uniform initialization, rvalue references - there is a ton of useful, new features.
std also received lots of love - new algos, async, class templates that you can use... The list goes on and on.

You can also watch videos if you don't like straight-up googling, which seems to be the easiest way to answer your question.
 
Last edited:

kay

Legendary OT User
Joined
Apr 23, 2013
Messages
851
Solutions
9
Reaction score
1,090
Location
32316,31942,7
YouTube
TibiantisOnline
🤭
The user asked for nuances and you in your previous post clearly indicated that there is nothing to worry/be excited about, which is not true.

That's not exactly what I said.
Answering the OP question what he "needs to learn": I said there was no need to be bothered too much now - at his (re)entry point - about various random features, which may or may not turn useful, as he would easily get to know the stuff he actually needs in time.
But since you said that - yes, there isn't anything to worry about either as long as compatibility is maintained. And I'm not going to engage myself into any pointless dispute with you about how introduction of uniform initialization has changed the universe or how using the classic for loop in 2021 may implode the world.
 

4Nathu4

valoria.online
Joined
Oct 27, 2009
Messages
247
Solutions
8
Reaction score
141
GitHub
4mrcn4
That's not exactly what I said.
Answering the OP question what he "needs to learn": I said there was no need to be bothered too much now - at his (re)entry point - about various random features, which may or may not turn useful, as he would easily get to know the stuff he actually needs in time.
But since you said that - yes, there isn't anything to worry about either as long as compatibility is maintained. And I'm not going to engage myself into any pointless dispute with you about how introduction of uniform initialization has changed the universe or how using the classic for loop in 2021 may implode the world.
It's the second time I see you discouraging people from self-improving, which was clearly an intention of OP.
Telling people that they will be fine slacking instead is not productive, and I'm not interested in a discussion with an illiterate, so don't worry much.
 

kay

Legendary OT User
Joined
Apr 23, 2013
Messages
851
Solutions
9
Reaction score
1,090
Location
32316,31942,7
YouTube
TibiantisOnline
It's the second time I see you discouraging people from self-improving, which was clearly an intention of OP.
Telling people that they will be fine slacking instead is not productive, and I'm not interested in a discussion with an illiterate, so don't worry much.

Dunno about your definition, but for the sake of "productivity" I'd still opt for learning and using the stuff you actually need, and not everything in advance that's useful on a case-by-case basis.
 
Last edited by a moderator:

4Nathu4

valoria.online
Joined
Oct 27, 2009
Messages
247
Solutions
8
Reaction score
141
GitHub
4mrcn4
Dunno about your definition, but for the sake of "productivity" I'd opt for learning and using the stuff you actually need and not everything in advance when you may happen to never use half of it.
Dude, you just said that C++11 changes
doesn't really matter that much.
so the literacy part we have covered up here.
you can do as you did before and discover new possibilities during the process.
And here

You must know close to nothing about development if you don't know that you have to adapt to the change, and if you won't know about newer tools, you won't use them, ergo, you won't get to know them, so if he sticks to his old habits, he won't get to know the new ways
 
Last edited:

kay

Legendary OT User
Joined
Apr 23, 2013
Messages
851
Solutions
9
Reaction score
1,090
Location
32316,31942,7
YouTube
TibiantisOnline
decompiling this piece of garbage, which in your perception is a perfectly fine game engine.

The biggest irony is that the "piece of garbage", which you keep raging over in every thread, written 15 years ago in the obsolete C++98, actually was a fine and very stable game engine. Optimized so that it could run under AD 2005 machines with over 1000 active players, and so it can today. Meanwhile your fancy modern servers with the newest pre-released C++ standard, packed with cool code-features and 200 nice-looking classes - still struggle trying to provide anywhere near that stability, and mostly crash on daily basis, not to mention other issues.
 
Last edited by a moderator:

Kaspar

Unprejudiced
Staff member
Global Moderator
Joined
Jun 2, 2016
Messages
758
Solutions
2
Reaction score
777
Location
Stockholm
Take this via PM if you want to argue amongst yourselves. Otherwise, stay on topic -- without slandering each other.
 

4Nathu4

valoria.online
Joined
Oct 27, 2009
Messages
247
Solutions
8
Reaction score
141
GitHub
4mrcn4
Personal matters should be taken via PM
I never wrote such thing, and the server (program) did not ever crash. It was a host issue, which was unrelated.
I'm not interested in hearing what caused the aforementioned so please spare it, I believe my educated guesses enough.

The matter of discussion is nuances in modern C++, not C++98's viability.
We are not talking about the 2005 perspective, it's irrelevant, especially with all the new features that C++ has to offer that would not be useful back in the day.
The C++11 is being widely used, thus you can find way more help with your code, which is HUGE for a newcomer (you mentioned this scenario).

C++98 is outdated today, your answers are not only counterproductive but misleading, so please, don't talk on the merits that you don't understand fully, if you have any questions regarding the topic - I'll be more than glad to explain them to you, but please change your attitude first.
 
Last edited:

LordCompi

Well-Known Member
Joined
May 2, 2013
Messages
143
Solutions
1
Reaction score
73
Just one thing - c++ is not backward compatible :D
It is but not fully, you can still use features (not every) from C++98 under C++11 and up.
In the matter of fact this is compiler-related
 

kay

Legendary OT User
Joined
Apr 23, 2013
Messages
851
Solutions
9
Reaction score
1,090
Location
32316,31942,7
YouTube
TibiantisOnline
Just one thing - c++ is not backward compatible :D

It is compatible to an extent at which a beginner does not need to be bothered at all. Several edgy cases, where the most you probably wouldn't ever come across unless on purpose, don't change that fact. The same code within the same standard may also result in a different behavior depending on compiler (as said above), platform and even processor architecture. Still, it is definitely not something you'd want to push on a beginner, that's just unreasonable, so don't go out of context.
 
Last edited:

4Nathu4

valoria.online
Joined
Oct 27, 2009
Messages
247
Solutions
8
Reaction score
141
GitHub
4mrcn4
It is compatible to an extent at which a beginner does not need to be bothered at all. Several edgy cases, where the most you probably wouldn't ever come across unless on purpose, don't change that fact. The same code within the same standard may also result in a different behavior depending on compiler (as said above), platform and even processor architecture. Still, it is definitely not something you'd want to push on a beginner, so don't go out of context.
There is no scenario in which a newcomer will be better off using outdated software, especially the one that thrives to use up-to-date standards as OP does.

Having some knowledge in C++98, which can be easily translated to newer standards won't render C++11 (and later) environment unfriendly, in which a newcomer can receive help and have wider access to methods that have been developed to make the language (also for the newcomers) friendlier and more optimized.

Pro's of going out of your comfort zone and using newer standards
  • You can get support for free easily
  • You can use the newest methods which implementation in a later scenario takes a lot of time
  • You can code faster
  • You have access to more variety of tools that are still maintained or developed
  • The next adaptation attempt won't be that hard since you did it once already
Pro's of not doing so
  • You get to learn outdated, language-specific twists, which might give you some perception on why things are implemented differently in newer versions.
  • Almost no one will judge your memory leaks, because most of the people will just wtf after noticing your code is outdated and will quit reading it
  • You get to learn that you were wrong about trying this way
 
Last edited by a moderator:

kay

Legendary OT User
Joined
Apr 23, 2013
Messages
851
Solutions
9
Reaction score
1,090
Location
32316,31942,7
YouTube
TibiantisOnline
Nowhere I was stopping anyone from moving forward nor advising to stick to any older standard. What I said was that he did not need (and I'd suggest to finally differ "don't need" from "must not", "should not"...) to know all of that before starting. Programming itself is already a constant process of learning and it cerainly isn't true that you won't get to use anything new.
Now excuse me, but it's getting tiring when again what you're potining has nothing to do with what I said, and I know it won't stop.
 
Top