News for hackers. Stuff that matters.
Re:Ownership and Borrowing in D by WalterBright on Tuesday July 16, 2019 @01:56AM (#20447783)
D deliberately restricts what compile time code can do that involves the operating system, restricting it to simply reading files from the current directory and down.

This is to prevent the use of the D compiler as a malware target by sending it specially crafted source code to compile.

Re:Ownership and Borrowing in D by floatboth on Tuesday July 16, 2019 @05:00AM (#20448517)
Unfortunately, these restrictions make it hard to implement F# style Type Providers. Though honestly the filesystem one is not nearly as annoying as the inability to reinterpret-cast.
Re:Ownership and Borrowing in D by WalterBright on Tuesday July 16, 2019 @05:27AM (#20448625)
That's fine with me. I don't want to make the cross site scripting mistake.
Re:Ownership and Borrowing in D by pjmlp on Tuesday July 16, 2019 @07:38AM (#20449130)
Which happen to be currently broken on modern .NET runtimes because it wasn't done on a clean way apparently.
Re:Ownership and Borrowing in D by duckqlz on Tuesday July 16, 2019 @03:01AM (#20448045)
couldn't you just link to a c file in the same dir then use that to read up the file tree. I would be interested to know how D would prevent this.
Re:Ownership and Borrowing in D by WalterBright on Tuesday July 16, 2019 @05:16AM (#20448585)
D files don't #include .c files.