On Sunday, 29 July 2012 at 19:20:30 UTC, Jacob Carlborg wrote:
You could use versions which sets bool variables and use
static-if. I don't know if that's any better.
It'd still have the problem of the global name. Consider:
-version=use_foo
but then lib a and lib b both have:
version(use_foo
On Monday, 30 July 2012 at 10:30:12 UTC, torhu wrote:
I think there was a discussion about this a few years ago,
Walter did it this way on purpose. Can't remember the details,
though.
Hell, that might have been me. I first realized version doesn't
work for what I was using it for a couple yea
On 30/07/12 14:32, Jacob Carlborg wrote:
On 2012-07-30 12:30, torhu wrote:
version is good for global options that you set with -version on the
command line. And can also be used internally in a module, but doesn't
work across modules. But it seems you have discovered this the hard way
alread
On 2012-07-30 12:30, torhu wrote:
version is good for global options that you set with -version on the
command line. And can also be used internally in a module, but doesn't
work across modules. But it seems you have discovered this the hard way
already.
I think there was a discussion about t
On 28.07.2012 22:55, Adam D. Ruppe wrote:
After some experience, I've come to the conclusion that
using D's version() with custom things is usually a mistake.
Not always - I think it is still good for platform like tweaks,
version(X86) or version(Windows), or even version(Custom_Library),
(note,
The biggest downside is if you add a function, you have to go
back
to ALL the config files and add it in to make the project
compile.
enum bool wantsNewFeature = false;
which can be a hassle if you have like 20 config files. But,
this
is good and bad because it does make you think about it
On 2012-07-29 18:42, Adam D. Ruppe wrote:
I just hit another downside with custom version(): two libraries
might use the same name to mean different things.
The version has no namespacing, so that's another reason for not
using it for custom things. The config modules might be the best idea
for
I just hit another downside with custom version(): two libraries
might use the same name to mean different things.
The version has no namespacing, so that's another reason for not
using it for custom things. The config modules might be the best
idea
for libraries too. I wonder if we could do a d
After some experience, I've come to the conclusion that
using D's version() with custom things is usually a mistake.
Not always - I think it is still good for platform like tweaks,
version(X86) or version(Windows), or even version(Custom_Library),
(note, it is often smart to put an "else static as