September 25, 2014
On 9/25/14, 8:12 AM, Kagamin wrote:
> On Thursday, 25 September 2014 at 13:57:17 UTC, Andrei Alexandrescu wrote:
>> On 9/25/14, 4:33 AM, Kagamin wrote:
>>> On Thursday, 25 September 2014 at 09:16:27 UTC, Walter Bright wrote:
>>>> So how do you tell it to call myfree(p) instead of free(p) ?
>>>
>>> Maybe stock malloc/free is enough for him?
>>
>> That kind of commitment shouldn't be baked into the language. That's
>> why RAII and scope are better than his notation.
>
> Allocation is orthogonal to RAII and scope. Allocation creates resource,
> RAII tracks it.

Affirmative. -- Andrei

September 25, 2014
On Thursday, 25 September 2014 at 13:57:17 UTC, Andrei Alexandrescu wrote:
> On 9/25/14, 4:33 AM, Kagamin wrote:
>> On Thursday, 25 September 2014 at 09:16:27 UTC, Walter Bright wrote:
>>> So how do you tell it to call myfree(p) instead of free(p) ?
>>
>> Maybe stock malloc/free is enough for him?
>
> That kind of commitment shouldn't be baked into the language. That's why RAII and scope are better than his notation. -- Andrei

Only if you accept "The Right Way" philosophy. A "Worse is Better" person may disagree. There is no "better", it's all tradeoffs.
September 25, 2014
On 9/25/2014 3:46 AM, currysoup wrote:
> I quite like the idea of "simple by default" and you enable features with
> annotations (@usegc, @throws, @pure).

I think simple by default doesn't have those annotations - by default meaning "the code works". Those annotations all work to restrict what the code can do.
September 25, 2014
On 9/25/2014 3:46 AM, currysoup wrote:
> Would just like to remind you all that he's trying to foster conversation rather
> than declare "this is the most perfect language ever". A lot of his ideas don't
> hold water in their current form but I'm sure D wasn't designed in a 2 hour live
> stream :). I'm personally really excited at the prospect of some momentum in a
> language designed specifically for games engineers.

It is great to have a conversation. It's good to revisit assumptions about what a good language should be. Although I don't agree with him, I thought that it was great that he questioned the value of RAII.

But I think it's a waste of time to develop a new language that has 98% overlap with existing ones, like if I proposed a language just like C but with member functions.

September 25, 2014
On Thursday, 25 September 2014 at 09:27:16 UTC, Walter Bright
wrote:
> On 9/19/2014 4:47 PM, Max Klyga wrote:
>> Jonathan Blow just recorded a talk about the needs and ideas for a programming
>> language for game developer.
>>
>> https://www.youtube.com/watch?v=TH9VCN6UkyQ
>>
>> This talk mentions D quite a lot of times.
>> D is mentioned as the most probable to be adopted if it were possible for
>> frictionless interaction with existing codebase.
>> An interesting talk if you want to look at language design from game developer
>> perspective.
>
>
> Looks like he reinvented D dynamic arrays at 1:02. Sigh.

Yes the only thing that seems to be an issue between him and D is
the lack of ownership (his ! concept).
September 25, 2014
On Thursday, 25 September 2014 at 15:34:31 UTC, Andrei
Alexandrescu wrote:
> On 9/25/14, 8:12 AM, Kagamin wrote:
>> On Thursday, 25 September 2014 at 13:57:17 UTC, Andrei Alexandrescu wrote:
>>> On 9/25/14, 4:33 AM, Kagamin wrote:
>>>> On Thursday, 25 September 2014 at 09:16:27 UTC, Walter Bright wrote:
>>>>> So how do you tell it to call myfree(p) instead of free(p) ?
>>>>
>>>> Maybe stock malloc/free is enough for him?
>>>
>>> That kind of commitment shouldn't be baked into the language. That's
>>> why RAII and scope are better than his notation.
>>
>> Allocation is orthogonal to RAII and scope. Allocation creates resource,
>> RAII tracks it.
>
> Affirmative. -- Andrei

And in many cases scope statements are simpler, better, harder,
stronger !
September 25, 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.
September 25, 2014
On Thursday, 25 September 2014 at 22:52:39 UTC, Sean Kelly wrote:
> 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.

This is really missing the point. He knows RAII is useful and he knows RAII solves freeing free'd memory. Maybe it's time to re-watch the video.
September 25, 2014
On 9/25/2014 3:52 PM, Sean Kelly wrote:
> 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.

Yup. A very common source of bugs in C code is all the incorrectly written "if (error) goto cleanup;" code. Exceptions and RAII take care of most of that.

September 25, 2014
On Thursday, 25 September 2014 at 23:04:08 UTC, Peter Alexander wrote:
>
> This is really missing the point. He knows RAII is useful and he knows RAII solves freeing free'd memory. Maybe it's time to re-watch the video.

I was replying to the comments.  Sorry if I misunderstood.