Does D have too many features?

H. S. Teoh hsteoh at quickfur.ath.cx
Sat Apr 28 13:52:57 PDT 2012


On Sat, Apr 28, 2012 at 10:08:29PM +0200, SomeDude wrote:
> On Saturday, 28 April 2012 at 20:02:12 UTC, q66 wrote:
> >On Saturday, 28 April 2012 at 19:57:08 UTC, SomeDude wrote:
> >>On Saturday, 28 April 2012 at 19:23:00 UTC, q66 wrote:
> >
> >So you don't agree version() is horribly half assed without AND/OR
> >(how do you generate the same code for two different versions
> >without copying or creating a new version covering both cases
> >then?) and that "version = FOO;" makes no sense?
> 
> Sorry, with that, I agree. Nick Sabalausky proposed to remove
> version entirely.
> But I agree there could be something like:
> version(LINUX|OSX){
> ...
> } else {
> ...
> }

But if you're gonna do that, might as well just fold the feature into
static if. The point of having a separate version construct was to
provide a very basic, simple, easy-to-implement and easy-to-use way of
versioning stuff. I don't think it was ever intended to be a
full-fledged versioning system.


T

-- 
What doesn't kill me makes me stranger.


More information about the Digitalmars-d mailing list