OpenBSD port of dmd?

Sean Kelly sean at invisibleduck.org
Sat Mar 17 11:28:47 PDT 2012


On Mar 17, 2012, at 9:43 AM, Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> wrote:

> On 3/17/12 9:10 AM, Sean Kelly wrote:
>> Pretty much. I'd expect to see:
>> 
>> version (linux) {
>>     // optimized impl
>> } else version (OSX) {
>>     version = UseDefault;
>> } else {
>>     static assert(false, "unknown platform");
>> }
>> version (UseDefault) {
>>     ...
>> }
> 
> Taking this to its logical conclusion means that _all_ code that is currently unguarded must be guarded by version (UseDefault).

No need for logical fallacies.  My point was that for code where platform-specific optimizations are performed, construct the code in such a way that when porting to a new platform, the compiler points at places that bear investigation. 


More information about the Digitalmars-d mailing list