News for hackers. Stuff that matters.
Re:A little thing to love about Perl 6 and COBOL by ChuckMcM on Wednesday February 04, 2015 @06:29PM (#9000790)
I think the thing that would make perl 6 really successful would be to call it something other than perl. Many people who have programmed perl for a long time seem to think it is an abomination of the first order, many people who have never programmed in perl think perl is some sort of dead language like COBOL or PL/1. Both groups are going to have a systemic aversion to this new language simply based on its name. And that is unfortunate.

There are neat things in this new language and there is no reason to leave the sea anchor of a name attached to it. Call it something fresh and new and it can be the cool hotness that is up and coming.

Re:A little thing to love about Perl 6 and COBOL by cwyers on Wednesday February 04, 2015 @11:04PM (#9001651)
The avalanche has already begun, it is too late for the pebbles to vote.

Everyone knows it as Perl 6. Therefore, everyone who would write about it after this proposed name change would say "formerly known as Perl 6," so that people know what you're talking about. All the conceptual baggage remains.

(And the reason the Perl name is a boat anchor is because someone hooked a chain to it and sank it to the bottom of the ocean. Perl didn't die from natural causes, Perl was killed by neglect - neglect caused because Perl 6 was always right around the corner and why sink more effort into maintaining Perl 5 than was absolutely necessary? So now OG Perl is stuck on 5.x from now until the heat death of the universe, because this project poisoned the well.)

Re:A little thing to love about Perl 6 and COBOL by machinshin_ on Wednesday February 04, 2015 @11:29PM (#9001734)
> The avalanche has already begun, it is too late for the pebbles to vote.

thanks for the deep words, Kosh

Re:A little thing to love about Perl 6 and COBOL by desdiv on Wednesday February 04, 2015 @11:36PM (#9001758)
I apologize for being out of the loop, but who's Kosh?
Re:A little thing to love about Perl 6 and COBOL by cwyers on Wednesday February 04, 2015 @11:41PM (#9001773)
Kosh is a character on the TV show Babylon 5. It's where the quoted line is from.
Re:A little thing to love about Perl 6 and COBOL by erikb on Thursday February 05, 2015 @05:35AM (#9002562)
If he googled he would have even found a Youtube version of the quote.

http://youtu.be/g1GF4Gnb-D0

Re:A little thing to love about Perl 6 and COBOL by maxlybbert on Thursday February 05, 2015 @11:42AM (#9004159)
> Perl 6 was always right around the corner and why sink more effort into maintaining Perl 5 than was absolutely necessary?

What are you talking about? ( http://perldoc.perl.org/index-history.html ). A lot of the releases in the last decade were inspired by Perl 6 features. And Moose is clearly inspired by Perl 6.

I've spoken with people who believe the last Perl release was 5.8 (released in 2002). I believe this is caused by many Linux distributions still shipping old copies of Perl 5, but it's incredibly annoying.

Re:A little thing to love about Perl 6 and COBOL by Poiesis on Wednesday February 04, 2015 @11:41PM (#9001772)
I don't know what the right answer is here, but I find it intriguing that this approach is in a way the opposite of what Python ended up doing with the 2/3 split.
Re:A little thing to love about Perl 6 and COBOL by tomphoolery on Wednesday February 04, 2015 @11:59PM (#9001826)
Like many things that we love about Python, I believe it came about as a reaction to Perl. Because I'm pretty sure Perl 6 has been in development since I began learning Ruby, in 2005. That means the entire time I've been a Ruby developer, this project has been in development. I'm honestly surprised that it's being released at all.
Re:A little thing to love about Perl 6 and COBOL by nkurz on Wednesday February 04, 2015 @10:00PM (#9001510)
I have great fondness for Perl, think the the innovations present in P6 are great, and even I agree with you whole-heartedly: continuing to call it "Perl 6" is a terrible strategic blunder. The redeeming factor is that a great name is already in common use: just officially rename it to "P6". It carries practically no stigma while acknowledging the legacy.
Re:A little thing to love about Perl 6 and COBOL by kagamine on Thursday February 05, 2015 @02:32AM (#9002155)
Why not Perl 2000? It's both futuristic and original.

I don't think the name is the problem, I think that there is just too much competition among languages. If you ask a younger person which language they want to learn, will they think of Perl at all? Where is it used? Everywhere isn't an answer, Web or application programming or Apps are answers. What can I use instead that recruiters think is cool/relevant is also a fair question, albeit a simultaneously stupid one.

Re:A little thing to love about Perl 6 and COBOL by lumpypua on Thursday February 05, 2015 @03:27AM (#9002253)
Maybe I'm missing sarcasm. Perl 2000 is the definition of out of touch. 2000 was fifteen years ago.
Re:A little thing to love about Perl 6 and COBOL by davidgerard on Thursday February 05, 2015 @04:31AM (#9002384)
2000 was when the Perl 6 effort started.
Re:A little thing to love about Perl 6 and COBOL by henpa on Thursday February 05, 2015 @06:29AM (#9002696)
"Perl 3000" then! That should do it!
Re:A little thing to love about Perl 6 and COBOL by wues on Thursday February 05, 2015 @11:42AM (#9004162)
Then Perl 6 aka 2000 would share the fate of Wordstar 2000. But I guess it will anyway.
Re:A little thing to love about Perl 6 and COBOL by andrey-p on Thursday February 05, 2015 @10:56AM (#9003853)
Might get a bit confused with P5 (Processing).
Re:A little thing to love about Perl 6 and COBOL by chrstphrhrt on Wednesday February 04, 2015 @11:29PM (#9001733)
P6!
Re:A little thing to love about Perl 6 and COBOL by lumpypua on Thursday February 05, 2015 @01:36AM (#9002060)
P6 is a sick as fuck name. They need to do this.
Re:A little thing to love about Perl 6 and COBOL by brudgers on Wednesday February 04, 2015 @10:01PM (#9001513)
It's been so long that Perl is just a language most people might have heard about but probably never used. The name isn't a marketing issue.

Perl may even have some of that Lispy retro-mystery.

Re:A little thing to love about Perl 6 and COBOL by wwweston on Wednesday February 04, 2015 @06:40PM (#9000849)
I think Larry Wall once suggested it converge on perl 2π (progressively approaching 6.2831853071).

Not sure about the marketing value, but it's properly geeky.

Re:A little thing to love about Perl 6 and COBOL by chrstphrhrt on Wednesday February 04, 2015 @11:35PM (#9001757)
Re:A little thing to love about Perl 6 and COBOL by steveklabnik on Wednesday February 04, 2015 @06:58PM (#9000922)
Very similar to what Knuth did with Tex. I like it.
Re:A little thing to love about Perl 6 and COBOL by JadeNB on Wednesday February 04, 2015 @10:08PM (#9001543)
Actually, I think that, for exactly that reason, it's a wrong idea. Knuth's numbering is meant to suggest that, except for minor corrections, TeX is in its final form. I can't imagine Larry Wall ever feeling that way about Perl.
Re:A little thing to love about Perl 6 and COBOL by steveklabnik on Thursday February 05, 2015 @12:19AM (#9001875)
At his FOSDEM talk, he actually talked a little about how Perl 6 should be flexible enough to keep on changing basically forever... given that you can edit the parser even on the fly, it seems plausible.
Re:A little thing to love about Perl 6 and COBOL by erikb on Thursday February 05, 2015 @05:32AM (#9002555)
I'm certainly one who would rather learn Go or Ruby instead of Perl. Because I already know quite a lot Python and a little PHP, AWK and Bash I don't think I'll ever run into a usecase where learning Perl would be worth more than implementing a solution in e.g. Bash+Python+AWK. Around me the people all know these three languages better than Perl (or at least think so). Giving Perl6 a new name would certainly help in making it more interesting.
Re:A little thing to love about Perl 6 and COBOL by riffraff on Thursday February 05, 2015 @07:26AM (#9002842)
> I don't think I'll ever run into a usecase where learning Perl would be worth more than implementing a solution in e.g. Bash+Python+AWK.

that might be also because you are not familiar with perl6 though, a form of blub paradox.

I.e. are perl6 grammars better for parsing than anything available for python? Maybe or maybe not, but one needs to know them before being able to judge.

Re:A little thing to love about Perl 6 and COBOL by collyw on Thursday February 05, 2015 @08:18AM (#9003046)
I was playing around on hackerrank the other day as practice for a job interview using it. I haven't used Perl for 4 year, since I moved to Python, but all the problems i looked at seemed like they would be easier to do in Perl. Autovivificvation, and features built into the syntax just made certain things way easier. It was all doable in python, but you needed to do more checking.
Re:A little thing to love about Perl 6 and COBOL by erikb on Thursday February 05, 2015 @07:58AM (#9002954)
The reason I've written that comment is that I believe Perl lovers can, based on feedback like that, make better decisions about how to present their favourite language to the world. So if I would read a few articles on HN about how problems got solved with Perl in a way that Python wouldn't be able to, then I might start learning Perl soon. That's why I wrote that comment. Not for you guys to feel bad about your favourite language, but about helping you to present it better to people who don't know it yet.

The strong features of Perl that I know (which might be completely wrong): Regex and huge library. Both features are not distinct to Perl anymore though. Perl's regex might be a little better than Python's or AWK's but probably not enough to make it worth learning it.

And yes learning a new language to level that you not just know the syntax but also a few of the important libraries, blogs and developers is a huge task that takes several months. If you are not a student any more you really need to think hard before you commit to something like that. Sure there are people who just learn new languages for fun as a hobby. But that's not your target audience if you want your favourite language to become more popular.

Re:A little thing to love about Perl 6 and COBOL by maxlybbert on Thursday February 05, 2015 @11:51AM (#9004222)
> So if I would read a few articles on HN about how problems got solved with Perl in a way that Python wouldn't be able to, then I might start learning Perl soon.

That might have been the idea behind the ariginal article ("hey, Perl 6 has built in rational types").

Re:A little thing to love about Perl 6 and COBOL by b2gills on Thursday February 05, 2015 @04:00PM (#9006061)
One feature which I believe is distinctly available only in Perl 6 is it's grammar feature. ( think class/method based regular expressions that look similar to BNF )

As an example look at this Perl 6 grammar for JSON: https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...

Perl 6's best feature is that it combines many features from many languages in a way that allows combining them cleanly, and without any of them feeling like they were glommed on. (unlike Perl 5's object system which was inspired by Python's object system)

If you can get past the syntax differences from other languages, and program in it for a while, you may never want to go back to any other language.

If you can't get past the syntax, please say that you "don't like the syntax" instead of "it's unreadable" or "it's a write-only language" or "it's difficult to learn". ( I for one found it quite easy to learn, and can read it quickly. )

---

Really can you make all of the following examples clearer in any other single language?

  constant powers-of-two = 2,4,8 ... *; # an infinite deductive list

  # perhaps that would be more clear as:
  constant powers-of-two = 2, 4, 8, 16, 32, 64 ... *;

  # list of pairs using the zip meta-operator (Z)
  # combined with the pair constructor operator (=>)
  my @a = 'a'..'z' Z=> 0..*; # ( a => 0, b => 1, etc )
  my $new-password = ('a'..'z','A'..'Z',0..9).roll(12).join; # 'ygHIHbi4XgUV'

  # the zero in the following is to prevent an off-by-one error
  # when accessing by index
  # * + * creates a code ref that takes two inputs and numerically adds them together
  constant fibonacci-list = 0, 1, 1, * + * ... *;

   # takes about a second the first time it's accessed currently
  say fibonacci-list[10000].chars == 2090;

  # if you wanted it to look more like haskell you could write it like this:
  constant fibonacci-list = 0, 1, 1, &[+] ... *;

  my @dice-rolls := ('⚀'..'⚅').roll(*); # infinite list of dice rolls

  # deck of cards using the cross meta-operator (X)
  # and the string concatenation operator (~)

  my @deck = 2..10,<J Q K A> X~ <♡ ♢ ♣ ♠>;

  my @shuffled = @deck.pick(*);

  # ( .say ) is short for ( $_.say )
  # prints the first 6 numbers (0..5) each on it's own line
  for ^6 { .say }

  # prints the numbers 0..5 each on it's own line,
  # possibly randomized,
  # possibly each in it's own thread ( texas version )

  (0..^6)>>.say;
  (^6)».say; # ditto ( french version )

  # ( those were purposefully misusing an auto-threading list operator >> )

  # says a random number (1..5), 5 times out of 6
  if (0..5).pick -> $number { say $number }
  if (0..5).pick { say $^number } # ditto
---

That was just a sampling of the bread-and-butter constructs (some of which were used in a way that most people wouldn't use them). There are also operators for dealing with Sets for example. ( ⋃ and (elem) being two of them )

see: http://doc.perl6.org/

You can even create new operators the same way you define a subroutine ( That's all they are in the Rakudo implementation, for most of them. )

  # common factorial example
  sub postfix:<!> ( Int \n where * >= 0 ) is tighter(&infix:<*>) { [*] 1..n }
  say 5!; # 120
Re:A little thing to love about Perl 6 and COBOL by erikb on Friday February 06, 2015 @06:15AM (#9008525)
That is a quite convincing argumentation in favour of Perl6. Thanks! I really like this kind of code.
Re:A little thing to love about Perl 6 and COBOL by cafard on Thursday February 05, 2015 @09:16AM (#9003311)
It is possible that this is easier than I think in Python, but here is an example where Perl made my life (and various co-workers' lives) easier. A couple of years ago I needed to copy a bunch (between 1000 and 2000) posts from an old web site to a new one. This required parsing forms on the destination site, and also stripping out tags the new site did not support. The CPAN module HTML::TreeBuilder allowed me to do this quickly and without undue difficulty.
Re:A little thing to love about Perl 6 and COBOL by pwr22 on Thursday February 05, 2015 @07:44AM (#9002909)
Not everything is about utility for everyone
Re:A little thing to love about Perl 6 and COBOL by kamaal on Thursday February 05, 2015 @12:58AM (#9001975)
That's not exactly true. While its true that there issues with Perl. Its still by and large a language widely used by developers across the world. There is a also a huge and a very active community which does amazing things with it. Now taking away the name means re doing some 2.5 decades of marketing all over again. No body needs to go over that all over again.

There is a set of programmers with whom this won't go down well. Enterprise programmers and the hipsters.

Re:A little thing to love about Perl 6 and COBOL by singingfish on Thursday February 05, 2015 @01:34AM (#9002054)
don't forget the hipster enterprise programmers (aka the contractors)
Re:A little thing to love about Perl 6 and COBOL by peterwwillis on Thursday February 05, 2015 @09:58AM (#9003501)
how are contractors the hipsters of enterprises? if anything they're the yuppies. do whatever the fuck they want, get paid boatloads of cash, don't produce anything of value, are generally dicks. i think you're thinking of brooklyn trustfund hipsters, which are just the new yuppies.
Re:A little thing to love about Perl 6 and COBOL by Ovid on Thursday February 05, 2015 @10:17AM (#9003596)
I'm a consultant, produce plenty of value, have very happy customers, and I don't get called a "dick" too often. Don't pay all of us with the same brush, please :)

(Note: I'm the guy who wrote the post OP linked to)

Re:A little thing to love about Perl 6 and COBOL by singingfish on Friday February 06, 2015 @11:04PM (#9013008)
Us perl contractors (former in my case, a decent job in my home town with good working conditions came up) are what the enterprise turn to when they need to circumvent the bureaucracy.
Re:A little thing to love about Perl 6 and COBOL by maxlybbert on Thursday February 05, 2015 @11:52AM (#9004246)
The funny thing (to me) is that a little while ago, the Perl 5 developers started talking about renaming Perl 5 as a branding issue ( http://blogs.perl.org/users/matt_s_trout_mst/2013/02/pumpkin... ).

Because, obviously, if people don't like what you made, it's just a question of what you called it.

Re:A little thing to love about Perl 6 and COBOL by fidotron on Wednesday February 04, 2015 @06:44PM (#9000862)
I don't think so. The real problem with Perl is it's an aesthetic train wreck. It is possible to write beautiful Python, Ruby, Erlang, ML, Prolog, C, C++ or even Java, but I challenge anyone to write a non-trivial Perl (5 or 6) program that doesn't make you feel slightly ill.

Some of the semantics seem really nice, but the syntax is utterly disastrous.

Re:A little thing to love about Perl 6 and COBOL by bane on Wednesday February 04, 2015 @08:17PM (#9001200)
I used to work mostly in Perl. It's true that it can easily be turned into an obfuscated mess.

But I've also written some of the most maintainable code I've ever seen in my career in Perl. One project in particular was over 30k lines long (which in non-Perl languages must be worth millions of lines of code ;).

It was put aside for a few years (4 or 5 IIR), then I had to return to it to do some maintenance and inside of an hour was able to digest the code-base, make the needed changes, test and release.

Sloppy code and poor design infects every language. Perl does make it easy, but that's because Perl has a design emphasis on one-off scripts in the same way Java has an emphasis on large-team collaboration, and write-once run-once is what makes Perl so absurdly productive.

Just like with any language, you set some code standards and some overall design principles and you can write really maintainable code in Perl.

My wife has a similar story, after learning some basic Perl, she waded into a 100k line Perl codebase and in a couple days refactored some memory intensive code to use cheaper data-structures in a memory intensive part of the code. It was no-big-deal, but that's because the original team had left things well documented and wrote along sane standards.

Re:A little thing to love about Perl 6 and COBOL by anom9999 on Wednesday February 04, 2015 @07:07PM (#9000947)
I hear this argument time and time again and it's simply FUD. Bad Perl is no different to bad C++ or any other language with a flexible syntax. But it's also the same visa versa.

The problem with Perl is most times people are exposed to it, it's either from code golfing sessions were code is deliberately obfuscated; or when it's basically been used as a shell scripting language and thus often written by aging Perl hackers who don't care much for code cleanliness. And sometimes people just run away screaming because they simply don't understand all the regular expressions (but to approach Perl without an understanding of Regex is a little like trying to code Java without understanding classes then moaning about the weird surplus boilerplate code)

I'm not trying to say that Perl doesn't have it's faults. It has a great many problems. But to state that Perls syntax makes it impossible to write clean code, is just a daft flamewar argument.

Re:A little thing to love about Perl 6 and COBOL by crucini on Wednesday February 04, 2015 @10:06PM (#9001535)
Hmm.

In python you have: dog.head.ears[0].hairs[123]

In perl5 you have: $dog->{head}{ears}[0]{hairs}[123]

I can see why some folks prefer the former.

Re:A little thing to love about Perl 6 and COBOL by viraptor on Thursday February 05, 2015 @02:07AM (#9002103)
Isn't that a hash? Shouldn't python version be: dog['head']['ears'][0]['hairs'][123] ?
Re:A little thing to love about Perl 6 and COBOL by maratc on Thursday February 05, 2015 @03:28AM (#9002255)
In both Perl and Python, "object" is a glorified hash, and its attributes are entries in that hash. Python just allows for a deeper level of syntactic sugar.
Re:A little thing to love about Perl 6 and COBOL by pwr22 on Thursday February 05, 2015 @07:49AM (#9002927)
In Perl a hash is any scalar value blessed into a class

In modern Perl the attibutes would be accessed through accessors so the original example needs tr/{}/()/

Re:A little thing to love about Perl 6 and COBOL by anom9999 on Thursday February 05, 2015 @04:23AM (#9002360)
Perl's pseudo-objects are, in my opinion, one of the weakest aspects of Perl. So I'm not going to disagree with you that many other languages do that one thing better. But it's not always appropriate to nest your objects that deeply anyway (in any language, that can quickly become a mess).

In my personal opinion, I prefer C-style braces over whitespace formatted blocks. Which means I find reading function and iteration blocks much easier to read in Perl than I do in Python. I'm not saying one is "better" than the other, but just offering a counter argument for how subjective language aesthetics really is.

Re:A little thing to love about Perl 6 and COBOL by collyw on Thursday February 05, 2015 @10:24AM (#9003644)
Just to counter your points, having done many years of Perl, and now a Python.

Perls OOP does feel like a bit of a hack. But it does make it transparent how everything works. I learned Java at University, and everything OOP was a black box and I had no real understanding of how it worked. After learning the Perl way, its really obvious what is going on because it is so transparent. Your current object doesn't have a method? Just look along the @ISA array until you find an object that does have it.

Pythons whitespace is a pain at first, but having used it for a few years, one problem I do not miss is loosing a brace, when reorganizing blocks of code. You cut a few lines of code and paste it somewhere above or below, and your IDE shows you you are missing a brace somewhere. The indentation looks fine, so you can't see where it is.

The whitespace thing is worth it to get rid of that problem alone.

Re:A little thing to love about Perl 6 and COBOL by kbenson on Thursday February 05, 2015 @11:27AM (#9004050)
Aren't there just as many problems with cutting and pasting python and getting either slightly off indentation or mixed spaces/tabs? If the IDE fixes the problem, I don't see why it's any different for braces as it is for whitespace. There's easy ways to identify both.
Re:A little thing to love about Perl 6 and COBOL by anom9999 on Thursday February 05, 2015 @11:41AM (#9004154)
Exactly.

Arguing that one is better than the other is like arguing over which colour the best. Which is why I get so utterly sick of Perl being compared with Python - they are all going to have their strengths and weaknesses so at the end of the day, the "better" language / syntax boils down to personal preference.

Re:A little thing to love about Perl 6 and COBOL by collyw on Friday February 06, 2015 @04:09AM (#9008205)
I wasn't arguing that either way was better, just seeing the positives where negatives have been noted.

I personally haven't wasted anywhere near as much time with Python indentation compared to missing braces. I hated the whitespace thing at first, and it was only after going back to doing some Perl I noticed that the problem wasn't present in Python.

Though the fact that most other languages use braces is a pain, as it makes swapping between Python and Java / Perl / JavaScript / etc tricky, as I tend to get into the habit of using or not using semicolons at the end of a line.

Re:A little thing to love about Perl 6 and COBOL by esaym on Thursday February 05, 2015 @12:13AM (#9001862)
I can't stand the '.' syntax. Someone that doesn't know python would have no idea if those are method calls or what.

And in both cases, that is terrible code. Use a class or something...goodness.

Re:A little thing to love about Perl 6 and COBOL by coldtea on Thursday February 05, 2015 @06:07AM (#9002657)
>I can't stand the '.' syntax. Someone that doesn't know python would have no idea if those are method calls or what.

How is what someone who DOESN'T know Python would think relevant?

That said, after even the smallest familiarity with the language, he sees that it's obviously not method calls unless it ends in ().

Someone who doesn't know Lisp also doesn't know what (foo 4 2) or (quote foo 4 2) is.

Re:A little thing to love about Perl 6 and COBOL by FreezerburnV on Thursday February 05, 2015 @08:50AM (#9003195)
I'm going to disagree with you: as someone who has worked in an extensive Python codebase, based on the snippet above, I have zero clue what is actually going on. Those could just be attributes in the object, or they could be properties with arbitrarily complex code to calculate the resulting object. It could be the same object, or a freshly-allocated object, or an object that exists already. The index operator could be on a list, dictionary, or custom class with, again, arbitrarily complex code. All of that code could even be written in pure C for all I know! That single line of code could be a rats nest of a thousand lines of Python, or C, or both. And that's not even getting started with the possibility of metaprogramming or creating new classes by wrapping an existing class at runtime.

Saying that the snippet is obviously not using method calls is naive. Python is too flexible and allows programmers to do too many clever things for that, all hidden under "nice" syntax.

EDIT: Forgot a case for what that code could be doing: it could be accessing a module with globals.

Re:A little thing to love about Perl 6 and COBOL by esaym on Thursday February 05, 2015 @09:08AM (#9003268)
>How is what someone who DOESN'T know Python would think relevant?

Because most of the people that complain about Perl don't know it either.

I have no problem reading perl code of any kind (because I know it). Perl is a beautiful language IMHO.

Re:A little thing to love about Perl 6 and COBOL by draegtun on Thursday February 05, 2015 @10:12AM (#9003569)
Well if Explicit is better than implicit then this is one example of where Perl should be the preferred!
Re:A little thing to love about Perl 6 and COBOL by rtpg on Thursday February 05, 2015 @04:45AM (#9002421)
no snark, do you have a snippet you enjoy looking at in perl?
Re:A little thing to love about Perl 6 and COBOL by nevdka on Wednesday February 04, 2015 @08:03PM (#9001151)
I work with perl every day, and couldn't disagree with you more. The language is flexible enough to be anywhere from damned ugly to blessedly beautiful.

Much of the uglyiness can come from trying to write code for another language in perl syntax. Perl lets you write code that looks live Java, or C, or many other languages, but it usually ends up looking ugly. I see a lot of this.

But when you write perlish perl, especially using modern features of the language, then... yeah. It can look as beautiful as any other language.

Re:A little thing to love about Perl 6 and COBOL by muraiki on Wednesday February 04, 2015 @08:14PM (#9001191)
When I first started writing perl professionally, I kept trying to write things in a lispy functional style, which only made a mess. While it's true that There Is More Than One Way To Do It, there's still such a thing as "perlish perl" and by adopting this style I ended up writing some very pleasant and easy to read code.
Re:A little thing to love about Perl 6 and COBOL by vinkelhake on Wednesday February 04, 2015 @07:35PM (#9001047)
A long time ago I worked on a stock trading system written mostly in Perl. That code may have been a lot of things, but ugly wasn't one of them.

So, it's definitely possible to write non-trivial Perl programs without feeling ill.

Re:A little thing to love about Perl 6 and COBOL by nickysielicki on Wednesday February 04, 2015 @06:52PM (#9000894)
I disagree, I mostly write perl for my job and I think that most of what I write is at least equally beautiful but generally more beautiful than equivalent python.
Re:A little thing to love about Perl 6 and COBOL by MadcapJake on Wednesday February 04, 2015 @07:13PM (#9000966)
Perl 6 has lots of syntactic breadth with all the sigils, twigils, operators, composers, etc. But I feel that, as with Ruby, all the sugar really helps after you've finally made it past the initial WHUUUT? phase. Just takes a bit longer than some languages :P
Re:A little thing to love about Perl 6 and COBOL by tbrownaw on Wednesday February 04, 2015 @07:30PM (#9001027)
The only thing I don't like about Perl, is that it's a dynamic language and therefore unsuitable for large (as in, significantly longer than will fit on the screen at one time) programs. But "use strict;" helps with that, and apparently more recent versions (work has 5.8.8) allow subroutines to more easily declare a specific number of arguments.

I'm actually learning more of it right now, so I can clean up and modularize some of my scripts. Because my other options (ksh93, Progress 4GL, and maybe older versions of Java or C++) are even less suitable.

Re:A little thing to love about Perl 6 and COBOL by kbenson on Wednesday February 04, 2015 @07:54PM (#9001113)
If you haven't already, I highly suggest looking on metacpan.org for modules, and searching for highly rated[1] and recent ones. Things like Path::Tiny[2], Try::Tiny[3] and Function::Parameters[4] can make a huge difference in productivity and readability. Task::Kensho[5] is also useful for getting a good base set of medern modules to choose from for many tasks.

1: https://metacpan.org/favorite/leaderboard

2: https://metacpan.org/release/Path-Tiny

3: https://metacpan.org/release/Try-Tiny

4: https://metacpan.org/pod/Function::Parameters

5: https://metacpan.org/pod/Task::Kensho

Re:A little thing to love about Perl 6 and COBOL by tbrownaw on Thursday February 05, 2015 @08:58AM (#9003232)
I'll take a look at these, thanks. :)
Re:A little thing to love about Perl 6 and COBOL by muraiki on Wednesday February 04, 2015 @07:58PM (#9001130)
If you planned on using objects, you can consider using Moo for roles to allow composition, and combining it with Types::Tiny for type validation. There's also Params::Validate for plain functions.

The validation is unfortunately at runtime, but at least you get a clear error instead of unanticipated behavior. Moo (and it's bigger parent, Moose) can really help you structure your application better using roles.

https://metacpan.org/pod/Moo https://metacpan.org/pod/Type::Tiny

Edit: Don't use Params::Validate; kbenson's recommendation for Function::Parameters looks awesome!

Re:A little thing to love about Perl 6 and COBOL by eCa on Wednesday February 04, 2015 @08:58PM (#9001333)
There is also Kavorka[1] as an alternative to Function::Parameters, which can use Type::Tiny types in signatures. The next step after that is Moops[2]...

[1] https://metacpan.org/pod/Kavorka

[2] https://metacpan.org/pod/Moops

Re:A little thing to love about Perl 6 and COBOL by b2gills on Thursday February 05, 2015 @05:19PM (#9006535)
You may be able to get them to update to at least 5.18.0 if you tell them about CVE 2013-1667 and all the mitigations added to 5.18.0 to prevent them.

https://duckduckgo.com/?q=CVE+2013-1667&ia=about

http://blog.booking.com/hardening-perls-hash-function.html

I would also recommend reading "Modern Perl" which is made available for free by the publisher/author at http://modernperlbooks.com/

( Also there are large codebases written in Perl ( I beleive booking.com is an example )

I also recommend installing the Perl you are using outside of the system directories. You may also find Pinto and https://Stratopan.com useful for managing your dependancies. Which is especially useful if you make your codebase modular.

Re:A little thing to love about Perl 6 and COBOL by kstrauser on Wednesday February 04, 2015 @08:05PM (#9001153)
I've written Python systems several tens of thousands of lines long. I don't think dynamicity has anything at all to do with a language's suitability for large projects (but if it did, I'd lean toward it making maintenance easier).
Re:A little thing to love about Perl 6 and COBOL by Pamar on Wednesday February 04, 2015 @08:14PM (#9001192)
@tbrownaw... Do you mix Perl and Progress 4GL? Care to get in touch?
Re:A little thing to love about Perl 6 and COBOL by tbrownaw on Thursday February 05, 2015 @09:01AM (#9003241)
A little bit, yes. Contact info is in my profile now.
Re:A little thing to love about Perl 6 and COBOL by Crito on Wednesday February 04, 2015 @09:14PM (#9001387)
Are there any open source examples of beautiful C++? I don't doubt that it can exist, but I've never seen any. Maybe "beautiful for C++", but not "beautiful".

For that matter, ditto for Java. Ideal Java code seems to be "not notable", rather than "beautiful". At its best, it is clean and clear but unexciting, like a Honda Civic.

Re:A little thing to love about Perl 6 and COBOL by zby on Thursday February 05, 2015 @07:56AM (#9002948)
The culprit of the 'ugly Perl' meme is the $ character, all the rest is just a rationalisation of the first impression: http://perlalchemy.blogspot.com/2011/01/is-responsible-for-u...