3 ms·
I just started playing with Perl6 a couple weeks ago, and I am completely loving it now. It's the strangest process to get used to. I haven't had this much fun
by markrushing 10y ago
I just started playing with Perl6 a couple weeks ago, and I am completely loving it now. It's the strangest process to get used to. I haven't had this much fun programming in a long time. Some frustration every one in a while until I can wrap my head around some new concept, but that's to me what this language is all about. SO much conceptual stuff in it. Very, very rich.
I've been converting some old stuff to it to learn it, and it crazy how much more compact things can become. Working with grammars has been amazing. And I'm just now getting hit over the head with how flexible class roles with parameters can be to consolidate methods that do similar, but slightly different things.
I haven't even started into the concurrency bits yet... something about "promises" and "supplies". But I'm actually looking forward to it at this point. And that's really a surprising thing to me ;)
Anyway, my 2 cents on it at least. I'm not sure it matters if Perl is ever a poster child for anything. I think it kinda just doesn't matter.
- gotofritz 10y ago> I've been converting some old stuff to it to learn it, and it crazy how much more compact things can become Oh gosh that sounds scary. A lack of compactness was never Perl's problem, quite the opposite in fact.
- Ulti 10y agoNo one talking about Perl 6 compactness means golfed code! Just naturally translating over say a Java program with the OO design intact will be hugely compact. In a way that means the code is written at a succinct conceptual and declarative level. Perl 6 is incredibly declarative, you say what you want, not how to get there. The core features cover nearly all of what you want out of the box too.
- raiph 10y agoLarry has talked of this[1] as Clean Golf: > one should do token golf, not keystroke golf > would be a nice cultural hack to start the Clean Golf meme http://irclog.perlgeek.de/perl6/2014-03-11#i_8417918 http://irclog.perlgeek.de/perl6/2014-03-11#i_8417918
- markrushing 10y agoYeah, I didn't mean compact as in, oh let's see how few letters we can use. I meant compact in the way you can organize even VERY complex stuff, especially using their concept of grammars. You can write whole languages and protocols pretty neatly with those. Or like type. I've been loving their type system. You can use Perl as a heavily typed and enforced language, or not at all. And it's really easy to make up your own types, which you can also easily use for handling arbitrary constraints you might need. subset Even of Int where * mod 2 == 0; (1..1000).map: { when .is-prime { .say } when Even { say 'EVEN Num' } default { say 'no'} } Like there I just made up an new type called "Even", and used it when printing out stuff about numbers between 1 and 1000. But the really cool thing is you can use the exact sort of stuff for all kinds of variable types and even structures. It's just amazingly weird and open wonderful. I admit I've really fallen for it. ;)
- b2gills 10y agoThere is an operator to check if one number is divisible by another. subset Even of Int where * %% 2; You also don't have to write the where clause as a lambda. subset Even of Int Where $_ %% 2;
- markrushing 10y agowoot! :) still learning stuff ;) - though I'll use the first.