develooper Front page | perl.perl5.porters | Postings from May 2003

Re: windows, shortcuts and 'use lib'

Thread Previous | Thread Next
Edward Peschko
May 4, 2003 15:25
Re: windows, shortcuts and 'use lib'
Message ID:
On Thu, May 01, 2003 at 01:54:43PM -0400, Adam Turoff wrote:
> On Wed, Apr 30, 2003 at 10:50:59AM -0700, Edward Peschko wrote:
> > The point is that windows doesn't have symlinks - apparently without
> > the resource kit, and even then, only directory hard links. For
> > purposes of portablity across platforms it *should* have symlinks.
> So, your problem is that Windows is broken.  No news here.
> > And hence, I think perl should emulate them as it does fork().
> You're taking a huge logical leap from A to Q without really attempting
> to prove anything between B to P.  It's not Perl's job to fix Windows,
> nor is it Perl's job to pretend everything is Unix.

ok, lets get a little bit closer - how about the logic inside perl to translate  '/' to
'\' inside of perl code on win32 versa?  Do you think that's bad? And if so - given that
'/' is an illegal character in a filename on windows, why?

My point is that if symlinks are supported on windows it makes my job as a programmer
easier. It makes the perl port more cross platform. It solves a need on the system.
It furthermore only affects the Win32 port.

> Windows programmers who use Perl don't expect symlinks, so no problems
> there.

well, no.. Here's one windows programmer that expects symlinks. Other 
programmers on my project (people who are trying to port their solutions over
to windows) expect them there.  I see the issue constantly on*
asking why they aren't there..

> Unix programmers who use Perl on Windows expect Windows to be broken
> (e.g. no symlinks), so no problems there.  Yes, it's a pain to port Perl
> scritps that assume symlinks exist, but that's a fact of life, and most
> people have grown to accept it.

that's so anti-user I can hardly begin to reply. 

Your argument seems to be - "Windows is inferior to unix, why should we give people help 
to use it?  Never mind if users want to actually program on windows... they made the 
decision to use an inferior OS, hence they should take the consequences".

I seem to remember the line from "Airplane": *they* bought their tickets, *they* knew 
what they were getting into... I say, let them crash.

> I don't see how fork() emulation is remotely relevant here, as a
> "precedent", an "example" or a "mandate" to make Perl lie to you
> and pretend that symlinks exist when they do not.

But that's the point - shortcuts == symlinks on windows. In fact, in many ways 
shortcuts > symlinks. They are symlinks + a bunch of extra metadata, and they are 
used exactly like symlinks on windows.
> The issue isn't that your problem isn't a valid one; it's that your
> proposed solution is invalid for many, many reasons.  If you want
> support for Windows .lnk files, then please write a module for it.
> If you want to 'use lib "mylib.lnk";', there are ways around that
> problem, like preprocessing the .lnk file before it makes it into
> @INC or stuffing a coderef in @INC that uses your Windows .lnk
> processing module.  But treating '*.lnk' as a symlink is a really
> bad idea.
> Remember, there's _ALWAYS_ more than one way to do it.  While your
> proposed solution would help *you* in *your* *one* *specific* instance,
> it's not a good behavior for Perl in general.  Try another idea instead.

Exactly who said it would be only useful to me? I'd think that a good robust symlink
solution on windows would help a *lot* of people. Hell, I've heard people complain about
it enough.

I tell you what - if you want to do something that would bring some light to 
my proposal, go back and pick holes in my solution that I posted 
( If you are right, 
and its unworkable, then hell I'll concede. But saying 'its a bad idea' when I say 'its a 
good idea', countered by 'No, its bad', and 'No, its good' isn't very constructive IMO.
Tell me concrete reasons *why* its bad, and then we'll have a point to start discussion.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About