November 25, 2022
On Friday, 25 November 2022 at 08:23:22 UTC, FeepingCreature wrote:
> On Friday, 25 November 2022 at 07:31:59 UTC, Dukc wrote:
>> I agree with others here that he must have some problem with the compile time he could solve without switching the language. D usually compiles far faster than C++. It may be because of his memory usage, perhaps that leads to excessive disk swapping. Should be solvable too.
>
> D has a tendency to give you lots of features, invite you to commit to them, then punish you somewhere way down the line when you can't back out. For instance, format!`` is very clever, but it's probably not beneficial for compile speed to have thousands of recursive instantiations of the formatting code in the compilation set.

Still, by the time your compile times are getting longer but are still tolerable, you can investigate and stop generating further template bloat. The compile times don't jump from 3 sec to a minute overnight, unless it's something that can be fixed easily.

Of course, if the problem of the blog poster is having continued to soldier on with compile-time format or regexp or similar, then there might not be an easy fix. Still easier than switching language though.
November 25, 2022
On Friday, 25 November 2022 at 08:23:22 UTC, FeepingCreature wrote:
> On Friday, 25 November 2022 at 07:31:59 UTC, Dukc wrote:
>> I agree with others here that he must have some problem with the compile time he could solve without switching the language. D usually compiles far faster than C++. It may be because of his memory usage, perhaps that leads to excessive disk swapping. Should be solvable too.
>
> D has a tendency to give you lots of features, invite you to commit to them, then punish you somewhere way down the line when you can't back out. For instance, format!`` is very clever, but it's probably not beneficial for compile speed to have thousands of recursive instantiations of the formatting code in the compilation set.

Update: Correction! I've benchmarked it and this surprisingly appears to not actually make much difference. A lot of it seems to be going to boilerplate, unsurprisingly.

I wish `-vtemplates` gave you sum compiler time spent per template.
November 30, 2022

On Wednesday, 23 November 2022 at 17:20:54 UTC, Kyle Ingraham wrote:

>

Hi all. I came across this article on Hacker News: https://www.yet-another-blog.com/porting_the_game_to_jai_part0/

I’m interested in reading your thoughts on the ‘Why not D’ section. Anyone have experiences that match the specific points there? I haven’t experienced them but I also don’t debug on Windows. I also find D’s documentation to be excellent.

I’m super-positive on D but also interested in whether there are others with the same issues as the article’s author.

Thanks everyone for the replies. The context they provided was a great compliment to the article. There are some good learnings here too.

December 02, 2022

On Thursday, 24 November 2022 at 12:04:27 UTC, FeepingCreature wrote:

>

On Thursday, 24 November 2022 at 11:37:57 UTC, Hipreme wrote:

>
  • Agreed, if you can put case with static foreach, you should be able to put else if

This is not a case of "if doesn't work with this normal feature", it's a case of "case is extremely, extremely strange." Case statements work much more like goto labels than statements. For instance, this is valid code:

See also Duff's device.

1 2 3
Next ›   Last »