top | item 12890263

(no title)

oneandoneis2 | 9 years ago

My perspective as a Perl5 dev: Perl6 just doesn't interest me.

The two main reasons: (a) It's still not finished, but mostly (b) all I ever see is people in love with how clever they can be with the language.

I don't need to see hyper-clever ways of using built-in lazy memoised lists to generate a Fibonacci sequence in a dozen keystrokes. If I get tempted over to Perl6 (or any other language) it'll be be by examples of how easy it makes the boring, mundane tasks that I actually need a langauge for - things like reading from/writing to files; handling dates/times nicely; etc. etc.

What I like about Perl5 is its "Make the easy things easy and the hard things possible" mantra. The only mantra I hear from Perl6 is "Look how cleverly you can solve this contrived example". That's not something I care about in the slightest when I think about what language to write my next program in.

discuss

order

Ulti|9 years ago

A) It's released with a frozen spec and a large test suite for compliance (https://github.com/perl6/roast), with a compiler available that supports a module ecosystem with over 700 modules (http://modules.perl6.org). What's a complete state in your mind? If not this.

B) All of the below is core language, not a use or import anywhere required. Error reporting is also handled for you without autodie and friends.

  Reading from a file:

  #Efficiently line by line for STDIN
  for lines() -> $line {
      $line.say;
  }

  #Get everything in RAM right now
  my $string = "filename".IO.slurp;

  #Lazy list will do IO as you request into the list
  my @lines = "filename".IO.lines;

  #Listing of directories if the path is a directory
  my @directories = "coolstuff".IO.dir if "coolstuff".IO.d;

  Playing with dates:

  #Get a DateTime for right now
  my $date = DateTime.now;

  #Does what it says on the tin
  say "Yippee" if $date.later(:5years).is-leap-year;

oneandoneis2|9 years ago

A) Complete is when the compiler(s) actually implement all of the spec, for starters.

B) Nice examples. Well done. But it's not about whether you can do the simple things. It's more about the impression of the community and where its interest and focus lies.

I'd rather use a language where the mundane day-to-day stuff is the most important consideration. My impression of Perl6, however unfair that may be, is that the day-to-day functionality is the boring necessary evil that must be in there somewhere, but the true focus is the amazing stuff you can do with a language that's simultaneously trying to be a better Perl, and a better Lisp, and a better Erlang, and a better Haskell.

In my mind, Perl6 is a huge lumbering beast that tries to do absolutely everything. I'm sure if I ever feel the need to write a lazy asynchronous parser script, it'll be the first language that leaps to mind. In the meantime, I don't have the time nor the interest to bother.

jjolla888|9 years ago

> #Does what it says on the tin > say "Yippee" if $date.later(:5years).is-leap-year;

Is that a Georgian or Benghali or Indian or Buddist Era Thai leap year?

Actually are we talking the Georgian calendar - or the Julian, Revised Julian, Coptic, Ethiopian, Chinese, Hebrew, Islamic, Hindu, Bahai, or Solar Hejri calendar ?