Thread overview | |||||
---|---|---|---|---|---|
|
February 06, 2005 version(Posix) | ||||
---|---|---|---|---|
| ||||
Is there any way of getting a common version(Posix) *before* D 1.0 is out ? Or are we stuck with using: version (Windows) private import std.c.windows.windows; else version (linux) private import std.c.linux.linux; else version (darwin) private import std.c.darwin.darwin; else static assert(0); // unsupported platform Besides for the system-specific modules, most of it could probably be declared just once, in one module: std.c.posix.posix; // to define the portable calls (with "version" inside this one to import the others) And then the code could just do a more easily portable: version (Windows) { ... } else version(Posix) { ... } Just to get rid of the usual "if Windows else linux" crap ? (or, just as bad, using #if linux - meaning #ifndef _WIN32) Having to copy and paste linux to darwin once is bad enough. But having to do it for FreeBSD and Cygwin too is madness... D is meant to be portable, right ? (beyond Win32 / Linux X86) --anders PS. And what happened with the "version (!Windows)" patch ? Sure looks a lot better than "version (Windows) {} else" |
February 07, 2005 Re: version(Posix) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anders F Björklund schrieb am Sun, 06 Feb 2005 20:25:52 +0100: <snip> > PS. And what happened with the "version (!Windows)" patch ? > Sure looks a lot better than "version (Windows) {} else" Guess that patch and commrades like HTML and "line ending" have gone to the digital hunting grounds. *g* Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCB3Qq3w+/yD4P9tIRAq21AKDSCYiPi/+oY45B0naebnooB9iq5ACgwrbz HrfQVmdwLcohNo0uTC7XzRA= =onjr -----END PGP SIGNATURE----- |
February 07, 2005 Re: version(Posix) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kuehne | Thomas Kuehne wrote:
>>PS. And what happened with the "version (!Windows)" patch ?
>> Sure looks a lot better than "version (Windows) {} else"
>
> Guess that patch and commrades like HTML and "line ending"
> have gone to the digital hunting grounds. *g*
Methinks they are not dead, just resting? Or pining for the fjords.
--anders
PS.
But having a Bugzilla would be nice. A Version Control System too...
It's sad when good suggestions and fixes goes to waste like that ?
The current systems (Walter and David) are so easily overloaded :-)
|
Copyright © 1999-2021 by the D Language Foundation