Re:Ruminations on D: An Interview with Walter Bright
by Shoop on Tuesday August 30, 2016 @01:11PM
(#12391914)
I withdraw my claim that compile time IO doesn't make any sense, but it is something I would be worried about. I wouldn't want the executable my build process produces to be changed by what files are laying around on the disk. Mixing in all of the state in the file system with something you want to be mostly stateless (your build process) seems like a dangerous idea to me.
[ Parent
| on HN ]
Re:Ruminations on D: An Interview with Walter Bright
by dansze on Tuesday August 30, 2016 @01:24PM
(#12392022)
The compiler already depends on the state of the file system though, notably because it depends on the source code. In the above case, the xml is essentially just another source file that happens to not be in the same language.
An important difference is that the compiler doesn't know it's using that file ahead of time, which could have some unforeseen consequences, but I don't see anything immediately worrying about that fact since the compiler didn't know about the source either at it's own compile time.