On Tuesday, 8 March 2022 at 18:38:47 UTC, Paul Backus wrote:
On Tuesday, 8 March 2022 at 17:47:47 UTC, BoQsc wrote:
For example, you could use a [`version` condition][1]:

```d
module otherprogram;

version (Otherprogram_NoMain)
{
    // no main function
}
else
{
    void main(string[] args)
    {
        // ...
    }
}

// other functions...
```


There is no need for extra features when there is a version feature in D. Moreover, you can abstract the libraries it depends on, as I did [here](https://forum.dlang.org/post/dcfkmssxbzgbkkpar...@forum.dlang.org).

SDB@79

Reply via email to