Hacker News new | ask | show | jobs
by Kabacaru 3822 days ago
I'm fairly disappointed with this release. My read through of a tutorial in it went something like this:

* Oh you're sticking with that confusing % for hashes, @ for arrays then $ for everything else... maybe maybe classes have been sorted out though.

* Hmm, why is the syntax for defining a class totally different to defining functions and variables everywhere else

* Well they can't have made anything WORSE. Oh fields can have minuses in them?? Packages exist and you can define them but you're not supposed to anymore?

* Well at least you can't totally rewrite the language in some arcane way which means every bit of perl you come across is totally different and unreadable for 45min while you work out what the custom DSL does. looks at phasers, Meta operators, fix'es sigh

Great that this has finally been released, but it really doesn't solve the problems that Perl always had that it is TOO expressive and too customisable, meaning it'll always be vastly different project to project. On top of that it doesn't have the things that people are really excited about now, which is channels, selects and other things that make async easy. I think that this would have been an amazing release when Ruby was getting popular, but I think it's a few years too late.

3 comments

Yeah I can tell you've now learnt enough of the language to judge it at all... Or perhaps not at all! http://docs.perl6.org/type/Channel Though supplies with react/whenever is a lot more exciting than channels.
Confusing? How would you signify context then? A keyword?
> Oh you're sticking with that confusing % for hashes, @ for arrays then $ for everything else...

The claim is something like:

Some folk like distinguishing singular ($foo) and plural (%dict, @array) nouns even if some others dislike it.

Many human languages make the same sorts of distinctions to good effect which may give you pause for thought, especially given recent neuroscience emphasizing the apparent central role of natural language processing rather than math processing when folk comprehend code (the study I saw involved Java code fwiw).

Note that you can bind a name to avoid sigils:

    my \foo = %;     # bind foo to an empty dict
    foo = :bar, :baz # foo now has two key/val pairs
> why is the syntax for defining a class totally different to defining functions and variables everywhere else

The claim is something like:

Perl / Perl 6 are more serious than most other langs about variable scoping. Classes aren't closures and object lifetimes are different from lexical variables'.

> Oh fields can have minuses in them??

The claim is something like:

Many folk love that, eg lispers, and Perl isn't about telling experienced coders that they can not do things they consider elegant or useful.

> Packages exist and you can define them but you're not supposed to anymore?

The claim is something like:

You generally don't need to use the 'package' keyword because keywords like 'class' and 'module' are themselves variants on 'package' and do the necessary work of the 'package' keyword for you.

Perhaps you've read some doc that was written by someone who was learning Perl 6 and for whom English is a second language such as the learnXinY?

> Well at least you can't totally rewrite the language in some arcane way which means every bit of perl you come across is totally different and unreadable for 45min while you work out what the custom DSL does. looks at phasers, Meta operators, fix'es sigh

The claim is something like:

Perl 6 is a granularly malleable language. The features for empowering users to use this have been carefully designed to be sane but they can be abused.

> On top of that it doesn't have the things that people are really excited about now, which is ... things that make async easy.

The claim is something like:

Perl 6 has the things that people are really excited about now, including things that make async easy.

Perl 6 includes sweet concurrency, parallel, and async constructs.

I think you've read poor material or misinterpreted it.

> I think that this would have been an amazing release when Ruby was getting popular, but I think it's a few years too late.

Fair enough. Time will tell.