Rant of the day

Rumbu rumbu at rumbu.ro
Mon Jan 25 17:33:18 UTC 2021


On Monday, 25 January 2021 at 16:11:28 UTC, Adam D. Ruppe wrote:
> On Monday, 25 January 2021 at 15:07:02 UTC, Rumbu wrote:
>> Do you know what happens if you write GC.Free insead of 
>> GC.free?
>
> F.d(4): Error: no property Free for type GC, did you mean 
> core.memory.GC.free?
>
>
> There's gotta be something more to it on your end. My guess is 
> some other import with a function called Free that is 
> triggering all this ugliness.
>
> D's error messages do suck.
>
> Bigger problem with GC.free is it might not do what you think 
> it does, be warned: 
> https://issues.dlang.org/show_bug.cgi?id=21550
>
> If you GC.malloc, it good, but if you `new int[]` then try to 
> `GC.free` it is a silent no-op.

These error messages are a common effort of Visual D and dmd. 
Sincerely I am not keen to investigate further, but if this is 
the first sight for a new user, he'll run.

I just made myself a new computer and tried to install everything 
I had in the past. Among other things, of course I had some hope 
for D after a year of ignoring each other :) VS Code plugin 
completely failed - debugger error and CMake takes over Dub. 
Unusable.

Tried Visual D, 20+ errors. First contact.

(On the GC: I have a MmFile class and I need to force it to close 
the mapped file, I don't know another way of deterministic call 
of the destructor except `scoped` but it's not the case)


More information about the Digitalmars-d mailing list