
Operators and Meta-operators in Perl 6 - lelf
https://perl6advent.wordpress.com/2013/12/22/day-22-a-catalogue-of-operator-types/
======
lelf
You can check the whole series:
[https://perl6advent.wordpress.com/category/table-of-
contents...](https://perl6advent.wordpress.com/category/table-of-contents/)

------
jdlshore
Perl 6 is really an interesting language. There are a lot of tools like this
that give you the power to say a lot with a very small number of characters.

(The flip side, of course, is that you can easily make incomprehensible code—I
wouldn't want to read code using any but the most natural user-defined
operators—but if you set that aside, Perl 6 has a ton of cool ideas.)

------
tokenrove
The meta-operators remind me of adverbs in J

------
houshuang
So what's the situation of Perl 6? Is it production ready? Any demonstration
code?

~~~
Solarsail
(Assuming you're asking from a really long distance out) Well, there's two
current implementations of it (with Rakudo being actively developed):
[http://www.perl6.org/compilers/features](http://www.perl6.org/compilers/features)

As for example code, there's some on
[http://rosettacode.org/wiki/Perl_6](http://rosettacode.org/wiki/Perl_6) in
the bottom section. With all that said, is it production ready? I don't know.
I've heard people joke that Rakudo crashes every couple hundred lines of code
it executes. Though the parrot developers have said that parrot itself is
extremely stable, and they've had decently sized programs running for some
time on it. That, and Rakudo is currently working on two new backends besides
parrot: JVM and a new vm called MoarVM.

~~~
colomon
While Rakudo certainly crashes more than anyone wants, it doesn't crash
anywhere near as often as you suggest. It's a good thing, as it is implemented
in itself; you couldn't get to line one of your script without crashing if it
crashed every couple of hundred lines.

Actually, I don't know when the last time I got a random crash in Rakudo was;
it may have been years ago. Getting a crash because you ran out of memory, on
the other hand, definitely can happen in bigger programs.

------
asdfologist
I'm genuinely curious - why are programmers still using Perl instead of
Python?

~~~
goldenkey
Really? Python has magic everywhere and requires methods to take self as an
argument. Indentation instead of brackets. It's one big hack. Perl is a much
nicer language. The real question is, why would I ever use Python over Perl?

~~~
meowface
What in Python is "magical"? The fact that methods take a "self" argument is a
result of it _not_ being magical.

~~~
goldenkey
Methods taking "self" as an argument is a dirty hack, ain't no magic there.
The language is just pretty ugly. It's got the whole whitespace thing going
on, which is forced, and some might think it gives a good aesthetic but that
is dust in the wind in terms of help for Python's ease on the eyes. The whole
standard namespacing and mix of oop/procedural global functions is
just..schizophrenic, the capitalization scheme is dastardly. I haven't seen
many languages that look more _basic_ than python. It's a frankenstein of
Perl/Ruby and Basic. Forced verbosity is egh.

Here's your magic methods and properties:
[http://www.rafekettler.com/magicmethods.html](http://www.rafekettler.com/magicmethods.html)

Those magic methods kind of remind me of clever hacks while coding in PHP.

~~~
Alphasite_
Magic methods have always been my favourite part of python, they're the
developers way of ensuring we can do anything that they can do, if there isn't
a magic method for it, it's not possible. We can create our own version of
anything in the standard library.

Self is one of those things, if you wanted to you could easily add another
instance variable, just implement getattr and have it return a partial
function. Although I will admit it is one area which does cause more than its
fair share of errors, but I prefer it to Ruby's methodology.

~~~
goldenkey
Are the magic methods API frozen?

