[Semi OT] Language for Game Development talk

Sean Kelly via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 25 15:52:37 PDT 2014


On Saturday, 20 September 2014 at 02:25:31 UTC, po wrote:
>
> As a fellow game dev:
>
> I don't agree with him about RAII, I find it useful
>
> He kind of has a point about exceptions, I'm not big on them
...
> He goes on about "freeing free'd memory", this is never 
> something that would happen in modern C++, so he is basically 
> proposing an inferior language design.

It happens when you don't use RAII.  Sounds like he should review 
his concepts.

Regarding exceptions, they can be used incorrectly, but I think 
they tend to provide better error handling than return codes 
*because no one ever checks return codes*.  And when you do 
pathologically handle error codes, the amount of code duplication 
can be tremendous, and the chance for errors involving improper 
cleanup can be quite high.  Though again, RAII can be of 
incredible use here.

>  At one point he says you can't see the contents of std::vector 
> in a debugger. What? This is trivial and has worked in every 
> version of Visual Studio for the last 5+ years.

std::string tends to be more complicated because of the small 
string optimization.  Most debuggers I've used don't handle that 
correctly out of the box, even if sorting it out really isn't 
difficult.


More information about the Digitalmars-d mailing list