On 12/08/16 22:55, Walter Bright wrote: > > I'm surprised that I've never seen anyone else use such a technique. > It's so unusual I've seen it be unrepresentable in some 'make' > replacements. > > I suppose it's like unittest and ddoc. Sure, you can do it with some > contortions and/or some external tooling, but having it conveniently > built in to the language changes everything. >
Actually, even with it being easilly accessible in the compiler, there are sometimes reasons to still do it with an external tool. My next task at work requires precomputing a table. This might prove to be a quite intensive task, and the result will change quite rarely. Under those circumstances, I believe I will not wish to compute it each time the system is compiled, but to compute it when it changes and use a cached version. This means I still need a build rule for it, which means that if the build system does not support it, sucks to be me. Shachar
