16 ms·
Naive question time. Is Perl 6 something that non-Perl developers should be looking into? This may be inflammatory, but it's my earnest impression : as an outs
by doktrin 11y ago
Naive question time. Is Perl 6 something that non-Perl developers should be looking into?
This may be inflammatory, but it's my earnest impression : as an outsider, I really don't like how Perl's versioning was handled (5 vs. 6). On top of being unnecessarily confusing, it also gives an impression of complete mismanagement - fair or not.
With so many languages out there to choose from, what sets Perl 6 apart from other modern languages and ecosystems?
- bcoates 11y agoDon't know much about the rest of the language, but the Perl 6 regexes are a big improvement and I hope they take over as the conventional syntax in the world outside of Perl.
- giaour 11y agoWhat appeals to you about the new regex system? Is it a new syntax or an expanded feature set?
- grondilu 11y agoIt's a completely new syntax, though a few elements are identical (quantifiers for instance are similar). It tries to be more readable and intuitive. The regex system is also part of grammars, which did not exist natively in Perl 5.
- fancy_pantser 11y agoThey're probably talking about the new "rules" system: https://en.wikipedia.org/wiki/Perl_6_rules https://en.wikipedia.org/wiki/Perl_6_rules
- nickysielicki 11y agoWhat exactly don't you like about the way they did the versioning? Do you prefer what python did? Python 2 vs. Python 3 is a complete and utter mess. Perl, which exists mostly in the same use case, shouldn't have any of those problems.
- cname 11y ago> Python 2 vs. Python 3 is a complete and utter mess. Besides being off topic and adding no value to this thread, for those of us who made the transition to Python 3 with minimal fuss, this is just pure hyperbole. I really wish people would quit grinding their Python 2/3 axes.
- nickysielicki 11y agoAre you joking? Off topic? He made a comment about perl doing a poor version transition, and perl was largely replaced by python which also did a language transition. It makes complete sense to bring up python2 -> python3. I also made the transition to `#!/usr/bin/env python3` fairly smoothly. That doesn't mean that the majority of the community did. Python3 came out in 2008, next week will be seven years of it being out. Yet `#!/usr/bin/env python` still defaults to python2[1]. That's not quite the expected 5 years of transition that they hoped for. At year 5 it looked like this [2]. [1]: http://legacy.python.org/dev/peps/pep-0394/ http://legacy.python.org/dev/peps/pep-0394/ [2]: https://web.archive.org/web/20131204094939/http://python3wos.appspot.com/ https://web.archive.org/web/20131204094939/http://python3wos...
- kbenson 11y agoOn the short list of places where even those tired of hearing about Python migration problems have to admit the discussion is relevant, I have to imagine the Perl 5 to Perl 6 discussion qualifies.
- hahainternet 11y agoI've no idea why you were downvoted. Python is indeed going through an almost identical transition, except that 3 does not fix as much as 6.
- Scarblac 11y agoPython 3 fixes a few things, mostly in Unicode handling. What I've seen of Perl 6 looks like a new language. The main "problem" of the Python transition is the fact that Python 2.7 is so good.
- s_kilk 11y agoIn my opinion, yes. I had zero perl experience before diving into perl6. I've found it to be a great language with a fun community. As for compelling features, there was a good discussion on this a few days ago, so I'm just going to link to that: https://news.ycombinator.com/item?id=10637789 https://news.ycombinator.com/item?id=10637789
- sdegutis 11y agoIn my mind, the great thing about Perl has always been that it's built into pretty much every UNIX-like system, so you can literally use it out of the box in either Mac OS X or any flavor of Linux. But Perl 6 isn't universal like that (yet?) so to me it just competes with Python and Ruby, both of which I already know and which get the job done just fine, and which I have installed wherever I need it.
- agumonkey 11y agoThe subtype system is cool, the async too, the custom grammar also.
- kbenson 11y agoI think it's less what Perl 6 has that other languages don't have (almost everything is implemented in at least one language), and more that it implements everything together in one language. The pure breadth of what is supported is somewhat staggering. I posted the other day[1] about what I thought were some interesting features, so that might be a good start for some things that might set it apart. 1: https://news.ycombinator.com/item?id=10642153 https://news.ycombinator.com/item?id=10642153
- esaym 11y agoThere are plenty of Perl5 users that have never liked the idea of "Perl6" and swear that they will never use it. That is just one of the reasons why Perl6 took awhile to release. It was not made by the Perl5 community, it was/is a different community although it does have some Perl5 guys strewn through it. It will be interesting to see how it turns out. I plan on picking it up soon. So yes, non-perl people should try it. Other than the name, and Larry Wall, there is not much the same between the two. I am not following your issues with the versioning. Perl6 was supposed to be released like back in 2005 or so. In that context it made sense that the next release of Perl would be 6 and that the 5 series would just go into maintenance only mode. But that didn't really happen. Perl5 devs continued to do their own thing while a new community was built around Perl6 with different people.
- doktrin 11y ago> I am not following your issues with the versioning. As I understand it, Perl 6 is essentially a complete language overhaul. However, the sequential numbering implies an iteration. To me, that's unintuitive. At the risk of over-analogizing, it's a bit as if Scala had been released as Java (n). Totally, completely irrational? Maybe not. Confusing? Almost certainly.
- eCa 11y agoThink of Perl5 and Perl6 as American English and British English. Both languages are English, but essentially they are different languages but with a similar foundation. > Confusing? Almost certainly. Agreed. I don't know if it would've been better for Perl6 to not have 'Perl' in its name, but it almost surely would have been better for Perl5 if Perl6 hadn't had 'Perl' in its name.
- doktrin 11y ago> Think of Perl5 and Perl6 as American English and British English This is a bit pedantic, but I think a better analogy might be Dutch and German - similar roots, but where fluency in one doesn't confer fluency in the other. Granted, I haven't touched Perl 6 so the magnitude of difference I'm estimating is based off of a very superficial impression. Python 2 & 3 might be somewhat akin to American & British English. > It almost surely would have been better for Perl5 if Perl6 hadn't had 'Perl' in its name Agreed. From a distance, there's definitely the sense that Perl5 was sacrificed for the benefit of Perl6.
- ams6110 11y agoA lot of sysadmin stuff is really well supported in Perl. However, I do a lot of sysadmin work and I've never learned Perl. I use shell scripts, awk, sed, et. al, and when necessary to go beyond that I'll reach for Python (or lately, Ansible) because I find it so much more readable. I have no plans to look at Perl 6.
- hahainternet 11y agoYour whole post is you pointing out that you are willfully ignorant. Congratulations.
- gpvos 11y agoYou are not answering any part of the question.
- jeffdavis 11y agoListing features is a bad way to choose a language[1]. Program something in it, and if you get a good feeling, then probably a lot of other people will too, and the language will take off. Larry Wall is a linguist, and I think that is probably what sets perl apart more than anything. But yes, it happens to have the kitchen sink, too. [1] Unless you have hard requirements, like control over memory or runtime environment.
- incepted 11y ago> Larry Wall is a linguist, and I think that is probably what sets perl apart more than anything. He's also pretty good at telling jokes, which explains a lot of things about Perl ;-)
- giaour 11y agoMultiple dispatch in a scripting language is enough to make me take a serious look at Perl. The versioning was weird, but it could have been worse. At least they didn't take the PHP option and leap from v5 to v7 because the number 6 was cursed.
- dragonwriter 11y ago> Naive question time. Is Perl 6 something that non-Perl developers should be looking into? As a non-Perl dev who has been looking into Perl 6 after encountering some posts and samples, I'd say it is, though unfortunately the kind of documentation that would make the most interesting bits easily approachable is still somewhat lacking.
- hahainternet 11y ago> unfortunately the kind of documentation that would make the most interesting bits easily approachable is still somewhat lacking. Can you be more explicit? I'm not a Perl 6 dev but I would love to help adoption and I'm not so bad at documentation.
- dragonwriter 11y agoThe best way I can be explicit about what the Perl 6 docs are missing is holding up the official Python docs for any version [0] as a standard, and saying that Perl 6 needs that; and, for onboarding, especially a Perl 6 equivalent of what Python has as its Tutorial (the Language Reference and Library Reference are also important, though the latter might need rethought more fundamentally for Perl 6, with its more-complete independent modularization as opposed to batteries-included standard library.) [0] at https://docs.python.org https://docs.python.org
- hahainternet 11y agoPersonally I really dislike the Python documentation for an average module. Return types seem to never be specified and everything is written too much in a tutorial fashion. However, you bring up a good point as to the Language Reference / Library Reference. I'm not sure if there's anything remotely comparable for Perl6. I'll get looking into what it would need to add it. Also fwiw Perl6's stdlib is not as bare as 5s.
- tormeh 11y agoWhat style would you want it in if not tutorial? You're in the reference to learn something (possibly again), right? That's a situation tutorial style is well suited for.
- logicallee 11y agoGiven that perl 6 is compatibility breaking, we can category say that if it is not something non-Perl developers should be looking into, it has utterly failed: it means you've made a completely new language nobody should use who isn't already using it! that said, I don't think it's failing by this metric.
- marcosdumay 11y agoExploiting a post with this question, as somebody who knows Perl 5, I'd like to ask people that knows Perl 6: Will I be able to write a dictionary of dictionaries or arrays without looking at the documentation every time? Did Perl 6 syntax for references got sane?
- ugexe 11y agoThat depends on the person. I imagine anyone who looks at the docs for a few minutes would have a pretty good idea for themselves
- esaym 11y agoI really don't have any idea what you are talking about.. Are you talking about something like this: $hash_of_hash = { hash1 => {key1 => 'value1'}, hash2 => {key1 => 'value1'} }; say $hash_of_hash->{hash1}{key1}; Seems easy to me... I think reference syntax in Perl6 is gone. Which personally I don't like.
- kbenson 11y agoI imagine the gripe has something to do with either hash/array sigil variance, that you assign to hashes and arrays with lists (as opposed to ref constructors as you've done), or both. Both are cleared up by really understanding context as it applies in Perl 5, which is probably the single largest difference to other languages that is (sometimes unfortunately) easy to get along without understanding because of the DWIMiness of the language. Or references, but I tend to think most people should be able to understand them without too much trouble.
- marcosdumay 11y agoAs an example, this won't run: %hash = {key1 => 'value1'} $hash_of_hash->{hash1} = %hash Now, this will work (or something like it, I don't remember the syntax): %hash = {key1 => 'value1'} $hash_of_hash->{hash1} = \%hash The syntax makes a lot of sense when you read the specs. It does create lots of problems when you try to create complex data structures in practice. It's also complex enough (with enough corner cases) that I can't remember it if I don't use it every week - but maybe that's just me. By the way, I don't remember whether I must read the above structure as: $hash_of_hash->{hash1}{key1} or $($hash_of_hash->{hash1}){key1} I also don't remember if it is equal to the one you defined. I know it's in the documentation, and it's very clear there. It's just some corner case that I never bothered to memorize for any long time.
- muraiki 11y agoAlthough I program in Perl 5 professionally, I think that Perl 6 is something that non-Perl developers should look into. While it's true that P6 draws inspiration from a variety of languages and techniques, from Smalltalk through Reactive Extensions and more, a laundry list of features is not necessarily the best reason to adopt a language -- especially one with a small ecosystem. Instead, I think that P6 is worth looking at because of the "feel" of the language, or perhaps another way to put it is the way that all the pieces fit together. I found it easy to do the following in Perl 6: 1. Quickly write a small proof of concept program 2. Heavily use concurrent and asynchronous code in a way that "just works" 3. Fluidly mix imperative, functional reactive, and object oriented code 4. Add types for safe refactoring / further development Even though Perl 6 still abides by TIMTOWTDI (There Is More Than One Way To Do It) there was "something" that gave a consistency to all of the above. Or perhaps, nothing felt bolted on, which is perhaps a luxury of essentially starting from scratch. :) Perl 6 is not only fun to write, but also easy to read (once you of course learn the syntax, which is quite different coming from not-perl). My hope is that the ease of using its OO features and type system will help avoid the "hash-of-who-knows-what" problem. Lately the two languages I most enjoy using are Perl 6 and Go, which would appear to be almost total opposites! But they both have that "something" that just feels great to write. This is of course subjective, but I hope it's helpful somehow.
- athenot 11y agoRegarding versioning, it seems Perl did the same trick as Mac OS, minus the marketing part. From Mac OS 9 to Mac OS X, there was a total rewrite (which was originally planned for OS 8 but got delayed until NeXT saved the day). Switching from 10 to X (besides the unix/NeXT allusion) was a great way to remove focus on the major release number and shift it to the minor one. So look at it as Perl VI, minor version 0. :) Perl6's main strength and which makes it "fun" is that it is multi-paradigm. It supports many ways of approaching a problem, instead of forcing a particular model. So you get a toolbox instead of just a modular hammer.
- jjn1056 11y agoI would say its sorta like what Apple did, except Perl5 is still production ready and in active development. Although Perl6 has the Perl label for historical reasons and out of respect to Larry Wall, Perl5 and Perl6 are considered distinct languages by their respective communities and each has an independent development track. Even after Perl6 considers itself version 1 complete, Perl5 will continue to be worked on, and in fact it will continue to be the only version of Perl with a full library of tools and jobs available.
- kbenson 11y agoSo it's more like Windows {95,98,ME} and Windows {NT,2000}. Eventually both combined into a single version that could run almost all the prior software of either (XP).
- latj 11y agoWhat is confusing about 5 and 6?
- greyman 11y agoThat it looks like a new improved version, while in reality it is basically a completely new language.
- deleted 11y ago[deleted]
- MadcapJake 11y agoOne neat thing about Perl 6 is that many Perl 5 "isms" the compiler will catch and inform you of the right Perl 6 way of doing it!
- sampo 11y ago> Is Perl 6 something that non-Perl developers should be looking into? Perl5 was feeling the weight of its humble origins as a small language for scripts, designed in the 80's. All that $@%<>$_ syntax, and bad support for keeping larger programs clean and organized. Python's main selling point was: like Perl, but cleaner syntax and object system is in-build, not bolted on as an afterthought. Also Ruby's selling point was: Perl, flexible for meta-language hacking like Perl, but cleaner syntax and in-build object system, also not as restrictive as Python. Now Perl6 has everything that at a time made Python or Ruby feel more modern than Perl5, and more, even optional typing. (Well, it doesn't have Python's opinionated restrictiveness.) Of course at the moment, Perl6 doesn't have the huge selection of libraries that Python and Ruby have at the moment. I don't know what, if anything, is a good reason for you to learn a new language. But while in the trio perl5,python,ruby perl5 was the most dated, old-feeling language, now in the trio perl6,python,ruby Perl6 is now the most modern in its design.
- dragonwriter 11y ago> Of course at the moment, Perl6 doesn't have the huge selection of libraries that Python and Ruby have at the moments. Well, there is Inline::Python...
- reality_czech 11y agoThe goal of Perl 6 is to pull together many different things. The clarity of the original Perl, the ease-of-use of Java, the community size of experimental languages like Self, the raw performance of Bash scripting, and the safety of C++. If that's a combination that appeals to you, then go for it.
- vshjxyz 11y agoI would suggest you to use Perl only if you have a dmc delorean that can jump 20-30 years back when reaching 88mph I personally avoid it like a disease... Python + Ruby + JS are wayyy more used and future proof