Live data from Hacker News

Perl on Rails (2007)

bbc.co.uk

31–40 of 66 posts

Re: Perl on Rails (2007)

#31
post #13

Earlier quoted context omitted.

I assume Python 3.0 ~ Python 3.10 are slower than Ruby. https://programming-language-benchmarks.vercel.app/python-vs...

Interesting to see these results! I wonder how Ruby 2.x would stack up in this same benchmark.

The benchmarks are meaningless if they can be influenced by coding styles.

Re: Perl on Rails (2007)

#35

Comments are hilarious, especially knowing some of those people commenting most critically had recently been working at FM&T. At the short stint I did at the Beeb I spent a lot of time doing code for date maths using SSI and Perl before they decided to completely rewrite what we were doing in Flash. Perl is a great language, and Catalyst and Mojolicious are rock solid, as is DBIx::Class. I work all day with TypeScrip…

Every time I try to write Perl, between the sigils, weak support for numbers, and the archaic-feeling way of handling parameters in subroutines, I come away slightly disgusted. The convenience of the text processing routines is not a novelty or productivity improvement compared to other languages nowadays. And Perl seems slower than Python now on the kinds of workloads where I would be tempted to use Perl. What am I…

In the latest Perl5 you can define signatures like normal people[1], but it has been available as an experimental feature since 5.20[2].

[1] https://perldoc.perl.org/perlsub#Signatures

[2] https://www.effectiveperlprogramming.com/2015/04/use-v5-20-s...

Re: Perl on Rails (2007)

#36
I miss perl.

I don't think there are any other scripting languages that allow you to write very concise one-liners that can do very complex things. That's also where perl got its bad reputation from, but it's more a discipline issue than a language problem. I always rewrote my explorative one-liners more cleanly when I committed them to a final program, but nothing forces you to do it like python does.

Re: Perl on Rails (2007)

#38
post #36

I miss perl. I don't think there are any other scripting languages that allow you to write very concise one-liners that can do very complex things. That's also where perl got its bad reputation from, but it's more a discipline issue than a language problem. I always rewrote my explorative one-liners more cleanly when I committed them to a final program, but nothing forces you to do it like python does.

It becomes language issue when you need to manage code written by others.

Yes, the majority of bad rep it gets is because people picked it as first language and "just started coding", without reading up how to write stuff in readable way but that's... most developers.

Not many start their new language adventure with code style guide and while say Python at least nudges you toward semi-readable code, Perl gives you enough rope to shoot yourself and nuke a nearby city along the way. And any of you that goes "well, ropes do not explode" clearly don't know Perl deep enough.

That births a lot of shit code.... that new developers in a year or two now need to deal with too (which is bad) but also use as example on how to write it (which is way worse).

Re: Perl on Rails (2007)

#39
post #31

Earlier quoted context omitted.

Interesting to see these results! I wonder how Ruby 2.x would stack up in this same benchmark.

The benchmarks are meaningless if they can be influenced by coding styles.

Sort of. When I think of "which language is fast", I think of "when using idiomatic style". That, to me, is a good measure of how fast the language is, in general.

Benchmarks on aggressively optimized code are fun and interesting too, because they can tell you the hard lower limits of performance in the language runtime. But most people will never end up optimizing their code so thoroughly, so it's not particularly useful if you're interested in how a real working program will perform.

Re: Perl on Rails (2007)

#40
post #35

Earlier quoted context omitted.

Every time I try to write Perl, between the sigils, weak support for numbers, and the archaic-feeling way of handling parameters in subroutines, I come away slightly disgusted. The convenience of the text processing routines is not a novelty or productivity improvement compared to other languages nowadays. And Perl seems slower than Python now on the kinds of workloads where I would be tempted to use Perl. What am I…

In the latest Perl5 you can define signatures like normal people[1], but it has been available as an experimental feature since 5.20[2]. [1] https://perldoc.perl.org/perlsub#Signatures [2] https://www.effectiveperlprogramming.com/2015/04/use-v5-20-s...

That's a huge quality of life improvement, and I didn't realize it's been around for so long! I will have to give this a try.
Post reply on HN