Mailing List Archive

the :win32 pseudo-layer
Last year, xenu asked <http://markmail.org/message/v2f3jiwlo3fn67ky>:
> I was wondering about the status of the :win32 perlio layer. It's been marked as experimental for ages.
>
> What is preventing it from becoming non-experimental? What is not working/missing?

Great question, xenu, I wonder the same thing!

The archives suggest, to me, that this feature was perhaps begun by the late, great Nick Ing-Simmons pre-2006. It got some work about seven years ago. bulk88 was doing some things with it, that petered out. In 2020, bulk88 said, "I'm not sure why it's around."

So: if this is a thing begun in over 15 years ago and abandoned several times, this suggests to me that either:
1. it's done enough
2. it's not worth finishing
…and my primitive search of the CPAN shows it's unused. But I'm not much of a Win32 programmer anymore, and possibly there is some value in place that has escaped me.

*???? Is there a reason not to remove the :win32 PerlIO experiment?*

--
rjbs
Re: the :win32 pseudo-layer [ In reply to ]
On Fri, May 7, 2021 at 8:10 PM Ricardo Signes <perl.p5p@rjbs.manxome.org>
wrote:

> Last year, xenu asked <http://markmail.org/message/v2f3jiwlo3fn67ky>:
>
> I was wondering about the status of the :win32 perlio layer. It's
> been marked as experimental for ages.
>
> What is preventing it from becoming non-experimental? What is
> not working/missing?
>
>
> Great question, xenu, I wonder the same thing!
>
> The archives suggest, to me, that this feature was perhaps begun by the
> late, great Nick Ing-Simmons pre-2006. It got some work about seven years
> ago. bulk88 was doing some things with it, that petered out. In 2020,
> bulk88 said, "I'm not sure why it's around."
>
> So: if this is a thing begun in over 15 years ago and abandoned several
> times, this suggests to me that either:
>
> 1. it's done enough
> 2. it's not worth finishing
>
> …and my primitive search of the CPAN shows it's unused. But I'm not much
> of a Win32 programmer anymore, and possibly there is some value in place
> that has escaped me.
>
> *???? Is there a reason not to remove the :win32 PerlIO experiment?*
>

In theory, it saves a bunch of indirection because we'd no longer have to
use Windows' emulation of posix style file descriptors. In practice this
has never worked out because breaking fileno means it breaks a lot of
programs.

It was a good experiment, but it didn't work out.

Leon
Re: the :win32 pseudo-layer [ In reply to ]
On Fri, 7 May 2021 21:28:46 +0200
Leon Timmermans <fawaka@gmail.com> wrote:

> In theory, it saves a bunch of indirection because we'd no longer have to
> use Windows' emulation of posix style file descriptors. In practice this
> has never worked out because breaking fileno means it breaks a lot of
> programs.
>
> It was a good experiment, but it didn't work out.

Since all the IO functions go through win32.c, if for some reason we
want to bypass the CRT, we can do that there. In fact, that's what we
are already doing in some cases, e.g. in my recent read() fix[1]. No
special PerlIO layer was needed for that. Maybe back in the days it was
implemented differently? I have no clue.

Anyway, I agree that the :win32 layer doesn't seem to be very useful.

[1] - https://github.com/Perl/perl5/commit/dace60fbdbd315ddaeca8ff9dad1d4a672f95a3d
Re: the :win32 pseudo-layer [ In reply to ]
On Fri, May 7, 2021, at 5:43 PM, Tomasz Konojacki wrote:
> Anyway, I agree that the :win32 layer doesn't seem to be very useful.

Given the "been an experiment that nobody could sort out in over 15 years," *I propose that we remove the :win32 layer in 5.35.*

--
rjbs
Re: the :win32 pseudo-layer [ In reply to ]
On Sat, May 15, 2021 at 4:30 PM Ricardo Signes <perl.p5p@rjbs.manxome.org>
wrote:

> On Fri, May 7, 2021, at 5:43 PM, Tomasz Konojacki wrote:
>
> Anyway, I agree that the :win32 layer doesn't seem to be very useful.
>
>
> Given the "been an experiment that nobody could sort out in over 15
> years," *I propose that we remove the :win32 layer in 5.35.*
>

Sounds sensible to me.

Leon