4 ms·
I've got to say, perl6 is really, really fun to play with. (and I say this as someone who had not used perl before) So far I've gotten the impression it's made
by s_kilk 11y ago
I've got to say, perl6 is really, really fun to play with. (and I say this as someone who had not used perl before)
So far I've gotten the impression it's made by a bunch of smart, friendly hackers who care about quality in their software.
To anyone reading this, I'd strongly recommend casting aside any preconceived notions about perl and giving perl6 an honest shot.
- user9756 11y agoI'd like to take perl6 for a spin. However, other than playing with it I'm not sure how it compares to say python or ruby in terms of strong sides. I mean what are the cases perl6 would shine in comparison? (NOT TO FLAME! I'm asking for ideas to when perl6 would be an interesting tool for the job. AFAIK it had a good string manipulation ~ also I'm still reading the tut and currently it feels very bash and somewhat ugly (although helpful) with the % & @ prefixes).
- s_kilk 11y agoA few upsides I perceive: - optional, well-integrated gradual typing system. - perl6 is the first mainstream(ish) dynamic language to not suffer from a GIL of some kind. You can do real concurrency and parallelism in perl6. - perl6 is both equally as powerful, and much more simple than previous versions of perl. - a bunch of good ideas stolen from other languages. go-routines are in there, pattern-matching, gradual typing, classes, etc. Plus, functional programming is a first-class-citizen of perl6. There's so much good stuff in there. - overall, I think perl6 has the potential to become a very powerful (and yet robust and well engineered) hacker language, where you will not be constrained by implementation details of the VM the language runs on (I'm looking at you, GIL). I'd also recommend reading Curtis Poe's answer to a similar question: https://www.quora.com/Perl-programming-language-1/Should-I-be-interested-in-Perl6 https://www.quora.com/Perl-programming-language-1/Should-I-b...
- _wmd 11y ago> - perl6 is the first mainstream(ish) dynamic language to not suffer from a GIL of some kind. You can do real concurrency and parallelism in perl6. I went digging to try and understand what this meant, and seems it's referring to syntactic support for promises, which in at least the Rakudo implementation amount to a wrapper around a forking multiprocessing system (like the Python multiprocessing module). From my perspective this concurrency isn't any more "real" than equivalents available in existing languages, but maybe I'm looking at the wrong thing - you mention global interpreter locks, and usually they refer to threading. Does some implementation of perl6 have non-GIL threading? edit: from <https://perl6advent.wordpress.com/2012/12/11/day-11-parrot-threads/> https://perl6advent.wordpress.com/2012/12/11/day-11-parrot-t...: > The solution for these problems implemented in hybrid threads is to sidestep them altogether by disallowing write access to shared variables. The programmer (or in most cases the compiler) is obliged to declare a list of all shared variables before a newly created task is started. The interpreter would then create proxy objects for these variables which the task can use to access the data. These proxies contain references to the original objects. They use these references to forward all reading vtable functions to the originals. Write access on the other hand would lead to a runtime error. > In other words, all data is owned by the thread creating it and only the owner may write to it. Other threads have only read access. > For threads to be able to communicate with their creators and other threads, they still need to write to shared variables. This is where green threads come into play. Since green threads are light weight, it is feasible for a thread to create a task just for updating a variable. This task is scheduled on the interpreter owning this variable. To reduce latency, the task is flagged to run immediately. The data-owning interpreter will preempt the currently running task and process the new write task. Put another way, the data-owning interpreter is told what to write to its variables, so other threads don’t have to.
- gpvos 11y agoGIL stands for the Global Interpreter Lock, which python has been criticized for a lot. I don't know whether perl5 or other languages have one, really.
- antoinealb 11y ago
- RHSeeger 11y ago> - perl6 is the first mainstream(ish) dynamic language to not suffer from a GIL of some kind. You can do real concurrency and parallelism in perl6. Admittedly, not everyone would define it as mainstream... but Tcl doesn't have a GIL and has had threading for a good, long time.
- dragonwriter 11y ago> - perl6 is the first mainstream(ish) dynamic language to not suffer from a GIL of some kind. GILs are features of implementations, not languages; Ruby has implementations (most notably JRuby) without a GIL. And Clojure doesn't have a GIL, and seems to be approaching mainstream. And Perl 6 isn't mainstream yet (it hopes to be, but then so do most languages.) And there's plenty of not-currently-mainstream dynamic languages without GILs in their primary implementations; many in the Lisp/Scheme family.
- cpplinuxdude 11y agoLet's not forget what perl was created for; it's a practical extraction and report language. Initially it was used to extract tables from text documents, and its always had a strong focus on text manipulation and regular expressions. Its implicit variables and syntax mean you can write very, very concise code. Yet by following stylistic guidelines of your choice, you can write code that looks sane and maintainable. I really like the fact you can import os commands and call them as a part of the language. It makes writing scripts a breeze. In fact writing anything in perl is a breeze. Check rosetta code, you'll see Perl 6 is one of the most concise at every turn. As much as I really like python, I find that calling system commands is a pain.. calling os.system is obviously far from great, and calling subprocess can get cumbersome. I haven't played with perl in a while, but my past experiences with perl was always getting a lot done, with very little work.
- pyre 11y agoJust to note that it's not all puppies and unicorns. There are a lot of low-level commands that are all tied up in different modules in Perl. Like having to remember where what you want falls into the File::* namespace... or maybe what you need is in Cwd. I worked with Perl for 4 years, and while it's not the gauntlet of pain that people make it out to be, there were several annoyances (like needing to always hit the docs for that stuff).
- cpplinuxdude 11y agoI only used it for small scripts. I'd think twice before using it for anything more significant. What did you use it for, if I may ask? What how big a project are we talking about? I would have thought hitting the docs wouldn't be a part of the annoyances list. Did you feel you had to hit the docs more than with any other language?
- awwaiid 11y agoNote, however, that Perl6 is a completely different language with a different set of standard libraries and ecosystem and pros-and-cons. You'd be as well off comparing Perl6 to Ruby as you would Perl5.
- guelo 11y agoPerl 6 continues linguist Larry Wall's vision of making a very expressive language that matches the way humans think. To me the most unique aspect is Perl 6's unicode string handling which is probably the best unicode support of any language out there. I could see it catching on in niches that need to do heavy cross-characterset text processing.