Hacker News new | past | comments | ask | show | jobs | submit login

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.




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.


That's fine with me. I don't want to make the cross site scripting mistake.


Which happen to be currently broken on modern .NET runtimes because it wasn't done on a clean way apparently.


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.


D files don't #include .c files.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: