in reply to Re^2: The future of Perl?
in thread The future of Perl?
all the out-of-date OS support and huge swaths of other historical gunk
Unfortunately in relative terms, that accounts for mostly nothing.
99% of the complexity of the perl interpreter/compiler/runtime is due to its initial design. A clear example of premature and abusive optimization... maybe it made sense twenty years ago but nowadays it is just a heavy burden stopping perl 5 development in anything but trivial matters, and specially in getting new blood into it.
Anybody wanting to advance perl 5 seriously, should consider starting from scratch!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: The future of Perl?
by BrowserUk (Patriarch) on Nov 11, 2014 at 01:41 UTC | |
Anybody wanting to advance perl 5 seriously, should consider starting from scratch! Its called Perl 6. Unfortunately in relative terms, that accounts for mostly nothing. 99% of the complexity of the perl interpreter/compiler/runtime is due to its initial design. That's why you reduce & refactor. 30 something years ago I was contracted by IBM to work a maintenance gig on DB2. It was at that point written in COBOL of which I had minimal experience. I did a 4 week course on it at college. I (typically) went into the APAR database and picked the longest outstanding bugs to tackle. One example was a sev.4 that had been outstanding for 4 years. I spent 3 days trying to understand the bug report in the context of the code; and two more badgering a user to reproduce the problem. Once I understood the problem I tracked the bug to a 2500 line procedure that, upon inspection, although I understood what it was meant to do, I couldn't, from reading the code, work out how it did it! So, I threw away the entire body of the procedure, retaining only the inputs and outputs and set about rewriting it to perform the task it was documented as performing. The result was the reduction of a 783 (those who know binary will understand why the figure sticks in my brain), chunk of code to around 20 lines. It was the only contract I arranged to leave early -- I bought my way out of it. Two conclusions: You may be right -- you usually are -- but, given sufficient will, I'd be prepared to expend some time to trying to prove you wrong. C'est la vie. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
by Jenda (Abbot) on Nov 11, 2014 at 14:28 UTC | |
It was called Perl 6 and then it went insane. A complete rewrite of the guts with the cleanup and change of a few warts and with a few additions would make sense and would rightfully be called Perl 6. A bit akin to what Topaz planed to be, but without the decision to use C++. It might even make sense, if the project started a little later, to target the java or .net runtime (think Mono). It might even have been released about ten years ago while "the inner circle" would be busy writing the synopses of a new megalanguage with a cool codename intended to become the Perl successor sometime in the future or a little later. Jenda | [reply] |
|
Re^4: The future of Perl? (Legacy Code Quotes)
by eyepopslikeamosquito (Archbishop) on Nov 11, 2014 at 20:54 UTC | |
Anybody wanting to advance perl 5 seriously, should consider starting from scratch! Though I too would love to see that, I doubt it is realistic. Remember, both Topaz and Ponie were attempted and abandoned. The best we can hope for is probably a slow, relentless refactoring. Of course, the "old, huge, tangled code base problem" is not specific to the Perl 5 internals. It is a chronic problem in the software industry, even afflicting the blessed Perl Monks code base. :)
Some relevant quotes from Nobody Expects the Agile Imposition (Part VI): Architecture follow:
That's not to say it can't be done though. The great Netscape rewrite (ridiculed by Spolsky above) -- though a commercial disaster -- metamorphosed into an open source success story. Another example of a successful rewrite is the Perl 5 rewrite of Perl 4. | [reply] |
by BrowserUk (Patriarch) on Nov 11, 2014 at 23:41 UTC | |
The best we can hope for is probably a slow, relentless refactoring. Relentless I agree with; but I question "slow". It is my (long) considered opinion that if you reduce the targets to Windows and *nix (I'd say POSIX, but that lives about a decade behind (at least) linux); then with just 10 people (They'd have to be the right people), you could refactor perl5 in one year, to be: The secret: Fcuk the rest; get it working on these two first. Rational: If it can be made to work -- ie. passes the entire perl build test suite and perlbench on those two platforms, whilst having reduce the kloc by 50% and the average function size by 50%-- on those two wildly disparate platforms, then it can be made to work anywhere where there is sufficient will and bodies to tackle the task. (If there ain't; c'est la vie!) Detail: Whilst neither kloc nor function size is directly proportional to understanding, correctness and maintainability ; the correlation is so strong, over many studies over many decades, that it would be obtuse not to recognise that simplification is inversely proportional to understanding; and understanding is directly proportional to both correctness and maintainability. Target: Start small in terms of platforms (just two); start small in terms of functionality (just does what p5 does now); start small in terms reduction in size. I've suggested 50% but I believe 70% is (quite easily) achievable. If you reduce the current code by 50%; twice as many people stand a chance of understanding it. Then you emulate the pugs model: everyone gets a commit bit; (a majority of) 3 people have to agree, to rescind a commit. The guiding logicNothing substantial -- syntax or semantic -- changes until a 50% reduction (compiled kloc) occurs. Then you invite both requests-for-change, and patches. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
by salva (Canon) on Nov 11, 2014 at 21:58 UTC | |
Of course, the "old, huge, tangled code base problem" is not specific to the Perl 5 internals. It is a chronic problem in the software industry Yes, but perl 5 is an extreme case. In any case, IIRC topaz was not a fiasco but a prove of concept that derived into the Perl 6/Parrot project. Ponie intention was to bridge XS and parrot, something dammed from the start because XS is just a way to access the perl 5 internals directly. A high level API hidden the implementation details is completely missing. Corollary: anybody wanting to advance perl 5 seriously should forget about XS compatibility. It is a too heavy to carry stone. | [reply] |