Jump to content


Member Since 21 Sep 2013
Offline Last Active Oct 22 2016 11:15 AM

#5269393 Criticism of C++

Posted by Melkon on 05 January 2016 - 06:20 AM

Yes, because the deprecation of some library features is the same as a 'rethink of the language'...

Who said it is the same? smile.png

As i said, Meyers and alot of great C++ programmer want to break backward compatibility in the language itself, not just in STL. (btw, STL is not just a random library) It would be still C++.

Most of the things which is allowed now (like: uninitialized variables without signing that "Yes, i know what i am doing"), but every static analyzer sign a warning aboit it should be cleaned up. Most problem in C++ is deriving from C, but C compatibility is not that important right now, and anyway we have great refactoring tools (thank you clang), so it's not too hard to change the language. If C++ will be cleaned, everybody will call it C++... just because something is changing it doesn't magically become a whole different language...

#5269388 Criticism of C++

Posted by Melkon on 05 January 2016 - 05:54 AM


C++11 broke backward compatibility, C++17 will also do this.

Can you point to any breaks?


There is a bunch of minor things in the stl (and i think there is some in the language itself), i won't search for it, but hanging around cppreference you can find alot of stuff which will be removed in C++17, in C++11 alot of contructor and stuff also changed and i am pretty sure not all in a backward compatible way.


These are for example will be completely removed: http://en.cppreference.com/w/cpp/utility/functional/bind12

Just like auto_ptr and alot of other useless class.


These were mostly unused, so it's not painful to the community, but it still breaks backward compatibility.

As far as i know, the name of this language is still C++.

#5269377 Criticism of C++

Posted by Melkon on 05 January 2016 - 05:13 AM


I seriously think someone should re-think C++ from scratch instead of driving away into another language.

A 'rethink from scratch' would just give you another language.

Anything which breaks backwards compatibility is a new language.

End of story.

And people have tried, D which was brought up earlier is this indeed incarnate, yet it has failed to catch on.

A 'rethink of C++' is no longer C++.


C++11 broke backward compatibility, C++17 will also do this.

Just in minor things, but still... this assumption is a fail. smile.png


Anyways Scott Meyers made a blogpost when he encouraged breaking backward compatibility in major things. This is something alot of great C++ programmer waiting for... and no, it wouldn't be a different language, it would be a better version of C++.

#5269359 Practicality of a C++ Garbage collector

Posted by Melkon on 05 January 2016 - 02:12 AM

As Stroustrup said, C++ doesn't have Garbage collector, because C++ doesn't generate garbage. smile.png

GC is problematic:

- It gives you the illusion that you shouldn't care about resource management. In real world you still have to (it's more of a beginner trap)

- There are alot of resource type (eg.: memory, files, locks, threads etc), but GC only care about memory.

- It's memory management is also poor, as long as you care about performance it's never acceptable.

- If you doesn't develop performance critical applications GC can be viable, but when you touch C++ you mostly really care about performance.


As long as you write idiomatic C++ code it's impossible to leak anything. What you don't use is released instantly.

The solution is simple:

- Never allocate directly any (non-thread) resource. So never write: new, delete, lock, unlock, open, close etc.

- Use resource handlers -> you will end up with an exception safe code without writing try-catch blocks everywhere.

- The best is if your static analyzer drop you warnings about resource allocation or release.

#5247320 Code Review

Posted by Melkon on 18 August 2015 - 12:44 AM

I'd like to have some one with better knowledge of C++ to point me in the right directly as far as decent C++ practices go.

I think it's a pretty good idea to read Scott Meyers's Effective C++.

It's easy to read, there are short and easily understandable tips which can help you improve your code.

#5243557 What skills is more important for a Junior programmer to master

Posted by Melkon on 30 July 2015 - 08:25 AM

I think people without working experience overestimate programmers in the industry.

I am a C++ programmer and i think most programmer in the industry have just a really basic knowledge about the language (however, they ended up with alot of experience in different territories, which are really useful)


I think you shouldn't overthink this, just apply for a job, try yourself and you will see what you should improve. :)
At my country, with a stable basic knowledge about your territory you can easily get a junior job, the interviewers will know that you don't have much experience...


Also: If you can show something, like ANY free time project which is not a homework like stuff it's matter alot. It says alot about you if you do these kind of stuffs in your spare time. :)

#5177077 Battalions, new-age online RTS

Posted by Melkon on 30 August 2014 - 12:13 PM


But I thought surely people would be inclined to give feedback on rather or not they liked the idea.



Well you posted a really long pdf about your idea. smile.png


It's a great work, and it's really great that you have such a detailed idea. smile.png
However you can't expect, that someone, who don't wanna actually work on it will read it. It's really good when you share your concept with someone who work with you on that, but it's much more than an idea. tongue.png

There is too much detail to catch the point as someone, who just read alot of topic searching for something interesting. Only the peoples who are already interested will read that pdf, but you didn't inspired anyone to do that.


I think you would have better success by writing an overview about your idea, what do you think, what's the most unique, most interesting thing in your project? What is the thing that will inspire someone to work on it, or play with it?

The details are really important if you want to make a good game, however, to sell your idea you should focus on the point of your project. smile.png


Also i don't know what's the point of that topic? Do you want opinions about your idea? Do you want someone to work with? (in that case, what do you need? C++ programmer? Artist? Musician?)


If you would clarify these things probably you would have better success, i guess the best you can do it is clarifying these things in another topic.


I hope i could help, good luck! smile.png

#5141259 Why does this work?(Class prototype?)

Posted by Melkon on 22 March 2014 - 11:52 AM

This is "Forward declaration"

You say that there is a class "a", and the compiler shouldn't know anything about it, because in the header you don't use the functions and variables in "a".




And yes, it's good, you include less file, so you will compile faster. If you can forward declare something, it's a good idea to do it.

#5137884 Computer Science vs Software Engineering

Posted by Melkon on 10 March 2014 - 01:16 PM


 I maintain myself since i am 18.


You're 18.  How much experience can you truly have in answering a question about how much going to university does or does not help you in landing a job?  


Oh to be young and naive again....


I am 23. oO

#5137874 Computer Science vs Software Engineering

Posted by Melkon on 10 March 2014 - 12:41 PM

I don't really understand why i got that much negative vote, while i speak from my (and from my friends) experience, so what i said is actually the truth.




Well, if you have zero experience it's harder to get through the HR guy, but as soon as you have experience it's doesn't really matter.


That's a pretty important statement you just kind of whizzed over.


If you have 0 experience, which EVERYONE starts out with 0 experience, then, it's hard to get through the HR door. And, the question of going to university or not is 80+% is being asked by people with 0 experience (ie, high school graduates).



That's not true, experience doesn't mean that you had a job before, you can do open source projects anytime, or you can do your own projects. That's experience. I studied at university when i got my job, and you know what? No one cared about what i learnt at university, i got my job because my spare time project. And honestly, it wasn't a big deal, it was like a 1k row (but well designed) code base c++ (sfml) tower defense game project, what wasn't even finished. And it was enough for my current bosses to choose me instead of other guys, who had much better grades at my university, but nothing to show.


And here i am someone, they chosed me because my experience and knowledge, not because my papers (obviously, because i don't have), here if i work on something my opinion about what i working on is actually count. That's pretty cool feeling, and i know that there is alot of job that doesn't work that way.




Many people looking for a job don't have the priniples to say "Heck, if that company won't even look at a resume without a degree on it, I'm not going to work there;  I'll continue to live at my parents and eat Ramen noodles every night!  I'm above that."  No...people want to get paid.



I don't exactly know why you try to attack me, that's pretty rude, and you are wrong. I maintain myself since i was 18. But if i can choose where will i work (and as a programmer obviously i can, because as a programmer you have like infinite potential workplace) i will choose what i like.

#5137814 Computer Science vs Software Engineering

Posted by Melkon on 10 March 2014 - 09:02 AM


Honestly, most job don't even require degree, most company care about your knowledge and experience.

So, it's doesn't really matter, choose what you like, you will still be able to get your dream job. smile.png


In theory, that might be correct, but in practice, most companies will look at your resume, and, if they don't see a degree, the resume goes in the trash.



Well, if you have zero experience it's harder to get through the HR guy, but as soon as you have experience it's doesn't really matter.


I mean, there is alot of company who care about your papers instead of what you can give them, but i don't want to work for a company like that. It's a bad attitude, and it's really far from me.


For example i want to work at Riot games later on, it's a pretty huge company, and they say you need Bachelor degree OR equivalent experience. Well, getting equivalent experience is not a big deal, and it's much faster than spending 3-5 years at university... Of course if you want to get a degree do it, it's good. But it's a choice, not mandatory.


Alot of company write that you need Bachelor's degree just to write something... I know it for sure, because most of my friends who work in the industry have no degree and will never have (i also don't have, and i like my job as a c++ developer), but their companies write that degree is required... so i don't recommend to take that part seriously. If you are good enough for the position and that's the only missing part just ignore it.

#5137771 Computer Science vs Software Engineering

Posted by Melkon on 10 March 2014 - 06:23 AM

Honestly, most job don't even require degree, most company care about your knowledge and experience.

So, it's doesn't really matter, choose what you like, you will still be able to get your dream job. :)

#5131347 [C++, Linux] Can't compile correct code

Posted by Melkon on 14 February 2014 - 12:19 PM

 I 100% know the code is correct


Well, i work as a c++ developer, and i am never brave enough to say that when i have a compile error. smile.png


At first look it seems fine for me but... please, write the compile error, because it's much more easier to help if we see what's your problem.

#5121993 Variable consistently returns bad values [FIXED]

Posted by Melkon on 07 January 2014 - 02:47 PM

Check IN the getter if they have a valid value before the return, or not.

#5120264 SFML Texture errors

Posted by Melkon on 31 December 2013 - 03:31 AM

Probably your video card driver is not updateed.


Here a guy (Deftwun) have the same issue, read the topic: http://en.sfml-dev.org/forums/index.php?topic=7604.0