8 ms·
Seems too little too late. Is Perl still relevant in 2015? What would you build in Perl today that you wouldn't build in another language instead? I used to be
by InclinedPlane 11y ago
Seems too little too late. Is Perl still relevant in 2015? What would you build in Perl today that you wouldn't build in another language instead?
I used to be a big fan of Perl but it seems to have fallen behind the times, I doubt Perl 6 is enough to catch up.
- agumonkey 11y agoThe typing and grammar mechanism aren't common, it may influence other languages. Also, Perl managed to survive even without mainstream relevance so the community will probably keep enjoying it. ps: I found this talk pretty convincing about pragmatism https://www.youtube.com/watch?v=lpu-3UF_b48 https://www.youtube.com/watch?v=lpu-3UF_b48 also: https://www.youtube.com/watch?v=JpqnNCx7wVY https://www.youtube.com/watch?v=JpqnNCx7wVY
- ebiester 11y agoThere is nothing stopping a resurgence of Perl, if it's an order of magnitude better than competitors. If the combination of modern Perl techniques and the language make it a good enough fit for a new interesting framework or tool, then we might all be writing Perl again in a few years.
- xlm1717 11y agoJust needs to get more jobs posted for it first. Going back to the original comment: >What would you build in Perl today that you wouldn't build in another language instead? You could turn it around too: what could you build in another language that you couldn't build in Perl? Well, nothing really. It's a matter of taste, and I think what continues to set Perl apart is its syntax, which could be really good and readable when you don't try to do code golf.
- InclinedPlane 11y agoI didn't say could or couldn't, we're talking about turing equivalent languages of course so that question is meaningless, I said would. You can code anything you want in native assembly, or in brainfuck even. But why would you? If you have some impressionable new college grad just getting into the industry how would you convince them to use Perl to build things instead of any other option?
- muraiki 11y agoHere's something that's normally not too fun to deal with in Python and Ruby: asynchronous operations. Perl 6 has promises, C#-style async/await, Go-style channels, and Reactive Extensions-style Supplies built in as first-class ways to deal with asynchrony, concurrency, and parallelism. It can also take advantage of as many threads as you'll give it. Since I deal with web services a lot, this is a huge boon for me. But I don't really want to give a laundry list of features, because that alone is not a compelling enough reason to pick a language (P6 obviously needs to develop an ecosystem). As someone who appreciates both OO and FP, both static and dynamic typing, P6 really hits a sweet spot. I encourage you to look at Perl 6 as a new language with the feel of Perl but which solves many modern problems.
- abc_lisper 11y agoAre you talking about Clojure ;)
- peatmoss 11y agoAs a fan / dilettante of Clojure, I'd say no. The JVM is many nice things, some nasty things, but definitely not lightweight in terms of things like startup speed that I'd expect of Perl 6.
- benjaminjackman 11y ago"The JVM is many nice things, some nasty things, but definitely not lightweight in terms of things like startup speed" The jvm startup speed is actually surprisingly good these days. We were experimenting with writing several commandline tools with Scala, and didn't think they would work because of this "well-known" issue. Turns out it was fast enough even to enable letting Scala handle things like the code completion and still have it feel very snappy.
- muraiki 11y agoI'd agree that the JVM itself isn't so bad in terms of startup time. However, the last time I compared Clojure and Scala, Clojure took significantly longer to start up (even though what I was doing in Clojure was nothing compared to all the libraries I was pulling in with Scala!) Edit: I should add that there's a Perl 6 JVM backend. While it's not as up-to-date as the default MoarVM, it could also be ready "for Christmas" :)
- pera 11y ago"too late" for what? Perl 6 is a super modern programming language with all the flexibility and fun of Perl 5. If you are looking for a multi-paradigm scripting language with an hybrid typing system then it's very relevant, just go and read its specs: I think you will find tons of interesting features that will make you want to use it some day.
- stone-monkey 11y agoThis was something that was tangentially addressed yesterday - the idea was that Perl 6 isn't meant to be a flavor of the week language, but something that could conceivably last for decades. One interesting thing Larry mentioned related to that long term view was that due to Perl 6 being a multi paradigm language, it could potentially become the defacto teaching language in academia, because it fulfills the roles of OO, functional, procedural, and logic programming in a single package. Eventually, that new generation of Perl 6 learners would go on to form startups and create bigger and better things. I'm not sure if this will come to fruition, but I think it's certainly worth keeping an eye on.
- deckard1 11y agoToo late for what? There is a difference between relevant and trendy. Perl, in many cases, is extremely modern. The Unicode support of Perl 5 is nothing short of state-of-the-art. CPAN is still an amazing resource. The web and OO frameworks for Perl are fresh as ever. I mean, yeah. We're all going to be using Node.js in another year or two. But that's because our industry is bloody ridiculous. Not because Perl is ill-equipped for the "modern" age (People raving about MVC, the actor model, and promises in 2015 is tiring)
- Moto7451 11y agoThere are quite a few Perl shops in LA writing new code and more than a few maintaining apps that have been around for a while. Lacking the sex appeal of Node and Go (or whatever the next hotness will be) doesn't mean something isn't relevant. Why build something in Perl? The same reasons you'd write something in Python, Ruby, C#, Java, etc: - Mature tooling - Excellent library support - Code samples written for relevant projects by vendors for their libraries [0] - Experts available Given the fact that there are a lot of good options, it's probably best to factor in, "Do I like it?" and/or "Would someone pay me for it?". For all the above the answer is yes. Additionally, Perl 6 is more or less a new language. If it scratches enough developer's itches, it'll likely take off on its own. It's mostly getting flack due to taking forever and Perl 5's perceived lack of sex appeal. I think if you frame your question with languages like Lua, Haskel, Schema, etc you'll find a good set of answers from users in each community. [0] https://www.elastic.co/guide/en/elasticsearch/guide/current/foreword_id.html https://www.elastic.co/guide/en/elasticsearch/guide/current/...
- peteretep 11y ago> There are quite a few Perl shops in LA writing new code These include Broadbean (in Irvine) and ZipRecruiter in central LA.
- Gimpson 11y agoMinor quibble... ZipRecruiter is in Santa Monica.
- Moto7451 11y agoYup and Connectivity in Burbank, Rubicon in Playa del Rey, and a few others in Thousand Oaks that run ad networks. TicketMaster used to have a Perl codebase but I think the murmurings I've heard point to them having switched everything to Java.
- nandhp 11y agoI find that anything involving a lot of regular expressions is easier to write in Perl than in Python. Perl and JavaScript are the only two mainstream languages I know of where regular expressions are first-class citizens (compared to Python, where you need to do `re.compile(r'...')` and store that somewhere).
- nemo 11y agoRegexes are really easy in Ruby as well (which cribbed a lot from Perl). There's an OO syntax, but also support for the Perl built-ins so this works fine in Ruby: print "match" if something =~ /thing/i Captures with $1 etc. are there as are named captures using the same syntax in the regex.
- raiph 11y agoThe regex sublanguages and engines in Ruby and Python are knockoffs of the equivalents in earlier Perls. But this thread really ought to be focused on Perl 6. In Perl 6 one can write: print "match" if something ~~ /<thing>/ It looks superficially similar. But it's a scalable parsing feature, not a mere regex. That line of code will work when `something` is ten thousand lines of complex Perl 6 code and `thing` is the top rule in a grammar for parsing Perl 6 code. Perl 6 is not Perl 5.
- nemo 11y agoI was showing Ruby code to show how its regex handling is much like Perl 5 - Perl 5 would use a sigil on 'something'. Ruby is less like Perl 6 regex-wise due to the smart match (among many other things).
- raiph 11y ago> Ruby is less like Perl 6 regex-wise due to the smart match (among many other things). In both Perl 5 and Perl 6, smart match (`~~`) with a regex on the right hand side is just an alternate spelling (Perl 5) or correct spelling (Perl 6) for `=~`. It's a tiny, trivial difference. But a Perl 6 "regex" can be an arbitrary full blown parser or compiler. And it assumes character=grapheme. In these two regards, as in several others, Perl 6 is quite unlike Perl 5 and other langs that adopted Perl 5 regexes and/or that adopted Unicode codepoints (or worse) rather than graphemes as their fundamental "character" unit.
- balls187 11y agoprocessing text files is still quite easy in perl. Also perl one line regexs are much nicer (imo).
- mrweasel 11y ago>What would you build in Perl today that you wouldn't build in another language instead? By that logic we should just stick to assembler or C. You can built anything in C, if you really wanted to. Perl or any other language, remains relevant as long as there are system depending on it and developers who use it. I view Perl a little like Cobol, you and I might not see it every day, but for a rather large, and perhaps a little obscure, subset of people it's still the tool they use every day. If you have 10 Perl developers employed already, it might be a wasted of effort to retrain to Python, Node, C# or what ever, and just do you next project in Perl 6. The biggest threat to Perl 6 might be Perl 5 though.