Branch nwellnhof/unicode_dynpmcs ready for final testing

Andy Dougherty doughera at lafayette.edu
Thu Feb 17 02:14:35 UTC 2011


On Wed, 16 Feb 2011, Nick Wellnhofer wrote:

> Branch nwellnhof/unicode_dynpmcs ready is for final testing. It enables
> Unicode filename support for all methods of the OS and File DynPMCs. For now
> Unicode filenames only work on Linux and Win32, but for other platforms it's
> simply a matter of implementing Parrot_init_platform_encoding in
> src/platform/*/encoding.c.

I know I've said this before and gotten no response, but this really 
strikes me as the wrong way to organize this.  Things like this should 
probably be organzied by features, not by platform.  Phrased differently, 
how many nearly-identical versions of this file will there be?  Will 
Darwin, FreeBSD, MirBSD, NetBSD, OpenBSD, and Solaris all really get their 
own independent copies of this file, even though they will all be nearly 
identical? As an example of how this gets out of hand, look at the subtly 
different versions of env.c.  There was a time when I tried to keep them 
in sync, but I gave up.  People changed one but not the other, leading to 
subtle breakage.

Instead, I think a single file with judicious #ifdef's is likely to be 
easier to maintain (or perhaps 2 files, since Windows is likely to be 
rather different).  As an example of this approach, look how I was able to 
collapse nearly all of the different sysmem.c implementations.  This also 
has the advantage that if a new operating system comes along (e.g. 
DragonflyBSD) it will just work out of the box without having to create 
another nearly-identical copy of encoding.c.

-- 
    Andy Dougherty		doughera at lafayette.edu



More information about the parrot-dev mailing list