Prototype buildsystem "Drake"

Timon Gehr timon.gehr at gmx.ch
Thu Jul 14 15:42:35 PDT 2011


Timon Gehr wrote:
> Nick Sabalausky wrote:
>> Ultimately, I think going with a rake/scons-like build-system approach just
>> allows for a little bit more boilerplate to be removed, which is good for
>> something like a buildscript. For example, if done as a library, once you've
>> defined all your targets, you'd have to call some function to actually do
>> the build. As a build system, defining the targets is all you need to do,
>> and the build gets invoked automatically. It's kinda like how dmain() calls
>> the user's main() instead of the work inside dmain() being a library
>> functions that the main() author needs to call. Plus, as a build-system, >>the
>> "void main(string[] args) {" part can eventually be removed (once sticking
>> normally-module-level things inside a function is mature enough, if it >isn't
>> already).
>
> It is not mature at all.
> Module-level things inside functions do not currently work well:
>
> Eg:
>
> - No forward references.
> - No forward references, reloaded:
> void main(){
>     int foo();
>     int bar(){return foo();} // ok
>     int foo(){return 100;}   // nope, *!* this is called a "redefinition" *!*
> }
>
>
> - No (template) overloading:
> void main(){
>     int foo(int x){return x;}
>     double foo(double x){return x;} // nope
>     int bar(int x)(){return x;}
>     double bar(double x)(){return x;} // nope
> }
>
> Those limitations are very itchy (at least for the kind of stuff I'd like to be
> doing), and should be removed.
>
> Cheers,
> -Timon

Oh, I forgot: template constraints seem to be lexically invalid on local templates.

Cheers,
-Timon


More information about the Digitalmars-d mailing list