Re: CTFE in betterC needs the GC

2022-10-29 Thread arandomonlooker via Digitalmars-d-learn
On Sunday, 30 October 2022 at 04:14:17 UTC, Ali Çehreli wrote: On 10/29/22 20:41, arandomonlooker wrote: > [...] Although you need that function only at compile time, it is an ordinary function that could be called at run time as well. The function needs GC for that concatenation in the

CTFE in betterC needs the GC

2022-10-29 Thread arandomonlooker via Digitalmars-d-learn
Hello, i'm a beginner to the D programming language that has posted many times for simple questions and code errors. I have written a function that manipulates D code (passed through a q{...} block) and returns it to be compiled into the program by a mixin. The problem is that i need to do so

Re: C-like static array size inference - how?

2022-06-07 Thread arandomonlooker via Digitalmars-d-learn
On Tuesday, 7 June 2022 at 00:20:31 UTC, Ali Çehreli wrote: On 6/6/22 17:04, arandomonlooker wrote: > [...] syntax causes > [...] As you already know, the correct syntax is 'int[]' :) but it won't work because -betterC cannot support dynamic array. [...] There is any chance size inference

Re: C-like static array size inference - how?

2022-06-06 Thread arandomonlooker via Digitalmars-d-learn
On Tuesday, 7 June 2022 at 00:20:31 UTC, Ali Çehreli wrote: On 6/6/22 17:04, arandomonlooker wrote: > [...] syntax causes > [...] As you already know, the correct syntax is 'int[]' :) but it won't work because -betterC cannot support dynamic array. [...] Thank you. I was kind of

C-like static array size inference - how?

2022-06-06 Thread arandomonlooker via Digitalmars-d-learn
Hello. I am working on a project related to low-level development as a beginner, and i decided to pick D as the most optimal programming language for that, in large part because of it's strong integration with C and C++. I happen to have a lot of arrays that i want to translate to D,