Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

How should Perl revolve?

by xiaoyafeng (Deacon)
on Apr 11, 2021 at 06:00 UTC ( #11131099=perlmeditation: print w/replies, xml ) Need Help??

Recently, P5P is arguing about the future development of Perl. As a long-term user of Perl (but not a core developer), I also have some ideas of my own.

The first and most important question is, what are Perl's real capabilities / advantages? sigil? Regexp? On some degree, yes, but not exactly. Perl's real power lies in its expressive power and self-evolvement. Language is language, and computer language is also a kind of language (although many people don't realize it now). The purpose of language is to communicate and express what they want to express. At the beginning of Perl language, Larry learned from many excellent functions of the language, so it can let people express what they want quickly accurately, which is the real reason why Perl stands on the river. So I conclude below by learning history of other languages(including human languages):

  1. When the language can't deliver what it wants to deliver quickly, there will be fewer and fewer users stay there, such as COBOL, lisp, Latin (human language), even if they have many bright spots.
  2. Without users, the language will die. In history, many languages have died out, they may have many advantages and characteristics, but now these characteristics may exist in other languages, but they themselves have died out.
  3. The language needs to quickly implement the features it needs, not whether it is elegant or not. Think about Japanese, Chinese, and even English. In the long history, they constantly learn from other languages to implement some new concepts. These implementation may conflict with their own, but it doesn't matter. As long as they can quickly accurately deliver these new concepts to achieve the purpose of communication, the language will not die. Languages that have been slow to implement new functions for the sake of elegant implementation (or because of lack of manpower) have all died out.

Let's go back and see how Perl should do? In recent years, Perl supporters have said that the advantage of Perl is CPAN (stand on the shoulder of cpan). what does it really mean? It means that Perl also has all the functions and libraries which other languages have(though there is maybe not in Perl itself)

Unfortunately, I personally feel that the core developers of Perl seem to have lost the direction of Perl(perhaps because of the stepdown of Larry?). They are addicted to deprecate the old functions instead of adding new functions and facilitating cpan developers. This leads to several severe problems to perl:
  1. More and more modules on cpan are not available, and even many authors give up their own modules because they want to adapt to new changes
  2. Because XS and its toolchain are too specific to C language and Perl, it is difficult for people who are not familiar with Perl to develop interface libraries. Think about UV, such a popular library needs people like PEVANS to maintain.
  3. Due to the lack of new functions or new libraries, Perl has fewer new users, such as GUI and parallel programming. This is a vicious cycle. Due to the lack of language functions and the complexity of language level, fewer and fewer people use Perl. Therefore, there are fewer and fewer heavyweight modules in cpan, resulting in fewer and fewer people using Perl. It should be understood that the difficulty of learning the language itself is never the first thing for users, but the function is. As long as you have the features users want, no matter how difficult, they will learn.
I admit that due to the lack of core developers, it is more and more difficult for Perl to implement new functions. Thus, I think the short goal of core developers should be how to make it convenient for cpan authors, especially some tools for quickly borrowing features/libraries from other languages. Imagine the real language, there are many words in English, which are borrowed directly from French, Japanese and many more. Some words have never been officially deprecateded. But the real function is used naturally, the bad function is put there, the user slowly becomes 0!

To sum up, I suggest that the core developers of Perl should be able to focus on (of course, this is only my personal wish) redesigning and implementing a language layer for communication with other languages. The current XS and its toolchain are too limited to C and obscure which makes it difficult for the user to develop such an interface.

In addition, the layer between languages should not be limited to compiled languages, but also include virtual machine languages and other specifications(consider how many ppl on windows use Win32::OLE). Because we are short of developers, when a new popular application or library appears in other languages, it may be difficult for us to have the corresponding Perl version very quickly. If there is a convenient way to establish a conversion layer at this time, so that Perl users can stay in the Perl world happily, I think it is great incentive for the use of Perl! FFI:: Platypus does very well. I hope it can enter the official package when it's mature. but I also want it could be more ambitious. to introduce more virtual machine languages, including C sharp, node.js , GO, etc. Inline:: XX may also be a direction, but it seems too duplicated to need to write its parsers for each language.

Of course, in the long run, of course, P5P can slowly polish the Perl language itself, maybe including type system, object system, better regexp, concurrency programming, etc. but it should be noted that language and its new features need to be learned by users. First of all, users should stay in Perl, without users, language and its features can not prove whether they are useful or not.


Thanks for Discipulus, GrandFather pointing out my various English mistakes. ;)

I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Replies are listed 'Best First'.
Re: How Perl revolve
by Discipulus (Canon) on Apr 11, 2021 at 09:19 UTC
    Hello xiaoyafeng,

    Firstly a link to The future of perl and to a recent video at fosdem: perl in 2025, just to have a real background for the discussion.

    That said I'm not at all qualified to speak about perl evolution but in the years I noticed that p5p tend to keep perl core as tiny as possible because this helps a lot the maintenance. Being CPAN so important for perl and perl developpers the concept of upstream/downstream was introduced to spot with easy those perl modules critical for the user base: see river of cpan.

    About human languages: there are loanwords and there are cognates. My mother tongue is nowadays full of loanwords and in my opinion they impoverish the language, overlapping or replacing words and expressions already present in the language. This is a matter of fashion and ignorance, mostly. I'm not a purist and I know my language absorbed a big lot of words from everywhere and in every epoch. I dont wont, as in French, a word in French for every damned part of a computer, ordinateur they say. This resistance make me smile. Something in between must exists. Anyway Latin has not died: it evolved into many Romanic Languages and influenced other langues too. What the carterpillar calls "end of the world", the rest of the world calls it "butterfly".

    So a concept or a function cannot be cut and pasted into perl: they must be digested and incorporated smoothly. How long are we waiting for signatures? I suspect signatures pose serious implementation problems and cannot be just put as is in the core.

    We had CGI for long time, and the web evolved under our feet. Other younger languages developped different approach to web serving. Ruby give birth to Sinatra: perl geeks looked at it they seen as a good thing, so they made Dancer and now we have PSGI and plack and Mojolicious and many better tools (ok: the order might be wrong but the concept is clear :).

    So we cant make a Frankenstein language: we must assimilate concepts and implemnt them in a smooth way. At least this is my opnion.

    You mentioned GUI and parallel programming. I do not concord on this and for sure is not the reason of fewer users. We have long standing tools like Tk and Tkx as GUI frameworks and they still serve very good. We also have a newer promising one Prima. About parallel programming we have MCE, a huge and succesfull effort by our brother marioroy to bring highest computational power to mere humans.

    The strength of perl, imho, is in its stabilty, realibilty and portabilty and to be a multipurpose first class languange. Only with core mudules you can already do a lot of nice things, for the remaining there is CPAN.


    PS 2021 April 12th: today I was pointed to "saving" perl at p5p and in is an interesting reading.

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re: How Perl revolve
by talexb (Chancellor) on Apr 12, 2021 at 00:24 UTC
      Unfortunately, I personally feel that the core developers of Perl seem to have lost the direction of Perl(perhaps because of the stepdown of Larry?). They are addicted to deprecate the old functions instead of adding new functions and facilitating cpan developers.

    I'm not sure I understand this part of your argument .. for me, one of the strengths of Perl is that old code continues to run just fine under new versions. I can't think of an example where an old function was deprecated, because that would cause old code to break. Do you have an example of this?

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

      I can't think of an example where an old function was deprecated, because that would cause old code to break. Do you have an example of this?

      See perldeprecation, and though some of the features may seem obscure, I do believe that they caused some breakages. As I recall, P5P did proceed quite carefully for each of them, checking breakages on CPAN etc. Also, they've generally fallen into two categories: One, things that have been deprecated for ages (e.g. $* and $# are documented as "Deprecated in Perl 5. Removed in Perl v5.10.0.", but weren't fatal until 5.30), or two, changes to make room for new syntax in the future (e.g. the notes for "Some formerly deprecated uses of an unescaped left brace "{" in regular expression patterns are now illegal" in 5.30 state "... will enable the Perl language to be extended in various ways in future releases."). Update: I guess a third category would be experiments that were removed - perlexperiment.

        Thanks for this .. yes, there have been a few quite minor features that were deprecated, but my reading of the original post talked about 'functions' that had been deprecated, and that made me think of actual keywords (like split, for example -- which has *not* been removed, obviously) that had been removed from the language, causing breakage.

        Alex / talexb / Toronto

        Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://11131099]
Approved by Discipulus
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2023-05-28 02:31 GMT
Find Nodes?
    Voting Booth?

    No recent polls found