-
--- On Sun, 6/28/09, aksjghkajshd <
scott@...> wrote: ...snip...
-
> > ... ?Are you _actually_ Scott Walters? No surprise if "yes"...
-
> Yes, I'm Scott Walters. Or SWALTERS on CPAN.
-
Figured as much, from your knowledge & informed comments about Perl...
[big snip]
> But this brings up another problem with translation. .. XS.
> Most Perl modules are written entirely in Perl, but many,
> including many of the most useful ones, are partially
> implemented in C. This includes but isn't limited to bindings
> to system libraries.
-
I did _not_ know this: The source of the CPAN modules I've inspected before
using (if for anything _more_ than just a one-shot utility) have been Perl-only.
No C code or calls to XS. It sounds like beginner's dumb luck.
> Those "XS" modules rely on details of Perl 5 internals that
> need to change and cannot easily be translated.
-
Ugh! This is truly a _terrible_ practice!
While it may have seemed quite clever at one time (? *long* in the distant past
?), this innovation which will certainly remain an implementation plague
forever, if not longer.
BTW: This is _exactly_ why API's were created. I recently gave an invited talk
on "The asset value of a good API", in which I lift several good examples
from...:
+
http://tinyurl.com/nbhhuk <---<<
> The XS interface has held back core Perl 5 cleanups and
> prevented Perl 5's growth. It's something of a paradox.
> Getting rid of it means breaking half of CPAN but keeping
> it means no future growth for Perl. Breaking the XS interface
> is perhaps more of a radical step for Perl going from 5 to 6
> than changing the language's syntax.
-
This explanation is extremely helpful.
However, it eliminates a potential way to obviate the "CPAN for Parrot" problem.
Namely, it seemed like a way that the problem could be avoided -- but _not_
solved -- via a Perl _5_ implementation for the Parrot VM.
It seems that this is a clever -- and _failed_ -- _modus_vivendi_
<<
http://tinyurl.com/nzrv8b >> , for at least two reasons...:
1. There is currently no C compiler "in the works" for the Parrot VM,
&
2. Making the XS interface work compatibly -- after the internal
offsets had been altered -- would likely be a nontrivial repair job.
<sigh>
This is a thorny and real-world problem...
Thanks, Scott! Mike
-
-
-=[eot]=-
-
-