modules and mains

Brian Tiffin btiffin at gnu.org
Sun Aug 22 03:22:02 UTC 2021


Is this wrong thinking?  I'm ~~working on~~ playing with a first 
project.

Meant to be a suite of tools, each usable from the command line, 
i.e. with a `main`.  Then a manager program that accepts 
subcommands for dispatch *and other boss type things*.

boss.d wants to import command1.d command2.d etc.

Is there a way for `command1.d` to know it's an `import` versus a 
file named as part of a `gdc` compile?

I'd like to skip defining `main` during `import` (using a 
different name for boss dispatch), but do define `main` when it's 
a standalone compile.  Or is that a bad way of thinking about D 
program development interactions?

Cheers


More information about the Digitalmars-d-learn mailing list