OpenBSD port of dmd?

Walter Bright newshound2 at digitalmars.com
Fri Mar 16 16:30:56 PDT 2012


On 3/16/2012 4:18 PM, Walter Bright wrote:
> On 3/16/2012 4:04 PM, Andrei Alexandrescu wrote:
>> Never say never. There are I/O routines that are specialized for several OSs and
>> fall back to a generic (slower) implementation.
>
> I'm going to suggest that is wrong as well. It's fine for a new port to use a
> generic slow implementation, but that ought to be a deliberate choice, *not* a
> default that went unnoticed during the porting process.
>

I should explain this better. Having a default is wrong because:

1. as mentioned, it can be overlooked in the porting process

2. if the default doesn't work right for some system, the temptation will be to 
'fix' the default in ways that are untested (and therefore broken) on other 
systems. Working on one system's code should not affect other systems!

3. it leaves unknown to the reader what systems that may apply to

I know the powerful temptation to avoid copypasta. But I have decades of trying 
it that way, and it just leads to lots of time wasted tracking down bugs. This 
includes historical bugs from doing it that way with druntime & phobos.


More information about the Digitalmars-d mailing list