4 ms·
IMHO, the things that Perl really has to do are no so much the clever syntax designs and run-times etc. which while cool to people interested in languages and h
by elblanco 16y ago
IMHO, the things that Perl really has to do are no so much the clever syntax designs and run-times etc. which while cool to people interested in languages and how they work, don't really allow the language itself to be used in larger scoped work. What Perl needs is a robust standard library that supports the kinds of things that people want to do with languages, like build interfaces, or solid web frameworks. Even better would be retargeting Perl to other languages, like a Perl->JS (so I can write Perl code for a browser) or Perl->JVM (so I can build the kinds of things I need that run on the JVM) compiler rather than building a runtime (Parrot), and re-targeting many languages to that platform.
Don't get me wrong, Parrot and Perl 6 are all worthy efforts. But I'm not sure they will have the kind of impact towards growth of the language and userbase that Perl needs. Perl desperately needs better OO syntax and support for functional programming paradigms. But syntax is syntax, libraries are what make a language useful in today's day and age.
- adam-_- 16y agoCatalyst is surely a fairly solid web framework. Moose provides a more standard OO syntax...
- elblanco 16y agoYeah, I forgot about Catalyst true... Moose though is an example of what should just be part of the language. I'm glad to hear that Perl 6 will be doing some of what I want, it'll be a good start. But Perl really really needs the kinds of things that people want to use modern languages for. It's still so geared for processing data files (of various sorts), and most of what I see in Perl 6 seems to target this problem in various ways. Don't get me wrong, Perl is my preferred language, I can crank out a Perl solution to a problem about as fast as I can type it. But when I really want to push the project larger, the language doesn't really do much to help you.
- avar 16y agoPerl already has a large standard library, it's called the CPAN. Unlike say Python the aim of Perl's standard libraries isn't to give you a good stand-alone programming environment, it's rather to bootstrap the CPAN toolchain so that you can install these libraries. Perl has numerous web libraries on the CPAN (Catalyst, Mojo, Dancer etc.), and if you don't like the bare-bones object system you should look at Moose.
- elblanco 16y agoWhile I think CPAN is a fantastic resource (I wish other languages had something even half as good as CPAN for a centralized repository of various libraries and other odds and ends), it's not a standard library, it's a collection of libraries. While PPM is sweet, I work on lots of systems that are not connected to the Internet, and believe me, not having a guaranteed minimum standard library can be a serious PIA. Most distros do at least come with a set of stuff installed by default, which is nice, but it also is not the same as a standard library since that loadout might change from distro to distro, or version to version. Basically the standard Perl library are whatever functions Perl happens to have. Which, while amazing for text processing, don't help much with other needs.
- avar 16y agoAny standard library is a collection of libraries. While I get your point, mine is that different languages have different ways of handling libraries, with different tradeoffs. Perl's way is to make it really easy to get libraries over the network, instead of trying to ship a large collection of them with the core. A standard library, I think. Is what you go look for when you need a module to solve your problem. With Java that's [1], with Python that's [2]. With PHP (until somewhat recently) that was using one of the ~1200 built-in functions. With Perl, the place to go for libraries is the CPAN. I look at http://search.cpan.org http://search.cpan.org, not `perldoc perlmodlib` if I need a library to do X. There are cases where this is painful, such as offline machines. But in those cases you can pack all of CPAN on a CD (with minicpan), or produce a self-contained Perl program + libraries with local::lib and/or PAR. 1. http://java.sun.com/javase/6/docs/api/ http://java.sun.com/javase/6/docs/api/ 2. http://docs.python.org/library/ http://docs.python.org/library/ 3. http://perldoc.perl.org/perlmodlib.html http://perldoc.perl.org/perlmodlib.html
- elblanco 16y ago> There are cases where this is painful, such as offline machines. But in those cases you can pack all of CPAN on a CD (with minicpan), or produce a self-contained Perl program + libraries with local::lib and/or PAR. Which is pretty much what I have to resort to :( I don't have to do this for the most part with Java or Python. PAR is good for deployment, but obviously hard for offline development work (sometimes you just have to do the work on those machines). Thanks for the pointer to minicpan. I might give that a shot, might save me from manually mirroring CPAN.