Hacker News new | past | comments | ask | show | jobs | submit login

I haven't looked, but I really hope Perl 6 held on to the 50 different ways to do any one thing. Pulling out my hair in frustration from trying to deal with Perl written by other people saved me all manner of haircut money in the 90s.



I suspect if anything, there will actually be more ways to do it in Perl 6. It can be used entirely from an object-oriented point of view, or entirely from a functional programming point of view. This is construed to be a feature of the language.

Flexibility is Perl's greatest strength and weakness. Perl forces you into dealing with other people's thought processes as a consequence of allowing your own code to be expressive and better reflect your thought processes. If this is not a tradeoff you're willing to make, Perl is most likely not for you. But I find it to be educational to see the variety in well-written Perl code (i.e. not from from Matt's Script Archive).


If you had tried to invest a little time to actually learn Perl, you might still have a beautiful mane on your head.


I suspect a lot of people didn't take the time to actually learn Perl which is why there's so much "there's-more-than-one-way-to-do-it" Perl code in the wild.

For whatever reason, I went the PHP route and I can say from nearly 20 years experience that PHP has the same problem even if it doesn't have the same philosophical approaches as Perl. Too many people who never actually learned the language producing near unmaintainable code.


Yep, it is absolutely a problem. I even made http://perl-tutorial.org to battle it somewhat.

The worst part is that people who believe they learned Perl by doing, instead of reading the reference docs and structured introductory texts, believe themselves to know Perl and speak publicly in the belief that the knowledge gained that way represents universal fact.


If you have globals, nulls, gotos, or whatever dangerous (but sometimes useful) features (e.g. states); surprise surprise people will end up using them at one time or another.

Perl is not the first nor will it be the last (imperative) programming language helps people fail too easy.


Double check me on this, but Perl 6 doesn't yet have a goto statement, nor does it have globals.


> Double check me on this, but Perl 6 doesn't yet have a goto statement, nor does it have globals.

AFAIK, Perl 6 has a goto statement in the spec (one big change is that Perl 6 is a spec), it just isn't yet implemented in any of the implementations. But presumably the target is to have the whole spec implemented for the release this Christmas. (EDIT: Actually, no, goto won't be in "6.Christmas" [0])

For globals, its has global scope ("our") but variables with global scope are still namespaced based on where they are declared, so while they are globally visible, they lack some of the more problematic features associated with globals.

[0] https://gist.github.com/jnthn/040f4502899d39b2cbb4


I guess I didn't make it clear enough but I was speaking in general terms and I wasn't just talking about Perl. i.e. I'm defending the people who weren't experienced enough not to realize that you shouldn't use a language's features just because they exist. Even when you have experience, people get tempted to just get things done regardless of how spaghetti the solution is


Looks like now you'll have 65 ways.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: