Live data from Hacker News

Perl's decline was cultural

beatworm.co.uk

201–210 of 472 posts

Re: Perl's decline was cultural

#201
I don't know, but for me Perl has not died at all. I still use it for smallish scripts and some CGI. Maybe I am an old retired fart, but it is the tool I reach for, when the problem looks like Perl-ish. Like I reach for C or other languages when I need that kind of things.

Re: Perl's decline was cultural

#203
post #191

Earlier quoted context omitted.

Was Perl one of your first languages by any chance? I freely admit that I've only been poking at it for a few months; maybe by this time next year, I'll be boggled at the comment I left, like it was written by a different person. > in between “bash script” and “real developer”. One of my coworkers gave me some great perspective by saying, "at least it's not written in Bash!"

> One of my coworkers gave me some great perspective by saying, "at least it's not written in Bash!" I wish bash was the thing that was dying. As an industry, we need to make better choices.

There’s nothing that can replace bash for what it does. People have been trying for decades. You’ll be happier if you accept that bash can and will happily coexist with anything and everything else, which is exactly why it will never go away.

Re: Perl's decline was cultural

#204

Should the Rust community take a lesson here, and maybe the Zig community to an extent? To me it seems that some in the Rust community in particular, perhaps because they're just the most vocal, are tightly coupled to progressive, social activism. I guess in general I just find myself wishing that political and social issues could be entirely left out of technical communities.

I'd love for politics to not infiltrate most aspects of life. Until everyone is able to, at least in part, persue life without being oppressed because of their immutable attributes, their belief or lack of belief system, who they choose to love and/or how they view themselves I think it's our civic duty to crusade for those causes.

Re: Perl's decline was cultural

#205

Earlier quoted context omitted.

It isn't bad language design that you need to study the language before you can use it. I look at haskell programs and it looks mysterious to me because I haven't spent any time studying it, but I'd not thing to say it is bad language design. Yes, one can write obscure perl code and some love perl golfing. In the same way there is an IOCCC which delights in unreadable code, it doesn't mean that the C language should…

But I can look at most Python code and be able to understand what it does. With perl, I have to look up so much. - Why is there a `1;` on a single line in the middle of this file? - What is `$_`? - This parallel execution manager doesn't actually seem to define what code needs to run in parallel in any specific way, how does this work? - What is this BEGIN block at the start of this Perl file? Why is that necessary?…

You’re mad that you have to look up what keywords do in a programming language you aren’t familiar with? If you think Python is always clear, I can guarantee you (as someone with relatively expert grasp of Bash, Ruby, Go, and once long ago, Perl) that no, it isn’t always obvious.

Re: Perl's decline was cultural

#206
I remember the first time a saw Perl, it looked like some kind of alien language from outer space, all the symbols it used looked insane.

But once you get it, its pretty intuitive to use.

The worst part about it was the syntax for object oriented programming, which in raku (perl 6) is a lot better and intuitive.

Raku has some great ideas like grammars, but has a lot of new magic symbology and lost what i thought was an intuitive way of regular expressions in Perl 5.

=~ vs ~~

Re: Perl's decline was cultural

#207
I think it's worth pointing out that Python only became popular after Google started using it. Remember when every nerd on the web was an ardent defender of Google? When people wanted to reach for a new language (say, for data science, also a new thing at the time) they reached for that slightly obscure yet easy to learn language that the cool tech company used. Schools adopting it exposed it to more people, but they picked it up, again, cuz Google used it and it was easy to learn.

Nowhere in that decision-making process is there the consideration of if it's actually a good language, more efficient, more flexible, more powerful, faster, etc. It was ease of use and "the cool kids are using it".

Re: Perl's decline was cultural

#208

Earlier quoted context omitted.

But I can look at most Python code and be able to understand what it does. With perl, I have to look up so much. - Why is there a `1;` on a single line in the middle of this file? - What is `$_`? - This parallel execution manager doesn't actually seem to define what code needs to run in parallel in any specific way, how does this work? - What is this BEGIN block at the start of this Perl file? Why is that necessary?…

Again: python syntax is more akin to what you are used to, and so it feels more comfortable to you. $_ is inscrutable if you haven't studied perl, but the same thing would happen to anyone who sees a python decorator for the first time. what does "else: do after a while loop in python? Only people who know python know what it does (and I suspect most don't). The different quoting operators are also trivial to learn.…

Given python’s love for string-leading sigils, the previous commenter should be quite comfortable with the idea of obscure single-letter operators that dictate the interpretation of the following tokens.

Re: Perl's decline was cultural

#209

Earlier quoted context omitted.

There was so much complexity hidden behind "do what I mean". For example, scalar vs array context which was super subtle: my @var = @array # copy the array my $var = @array # return the count of elements in array

That's not super subtle any more than it's super subtle that "*" performs multiplication and "+" performs addition. Sometimes you just need to learn the language. This is not a general defense of Perl, which is many times absolutely unreadable, but this example is perfectly comprehensible if you actually are trying to write Perl and not superimpose some other language on it.*

There's is no fair comparison to be made here with how + and * work is most languages, precisely because + and * work the same in most languages, while whatever perl is doing here is just idiosyncratic.

Even C gets it's fair share of flack for how it overloads * to mean three different things! (multiplication, pointer declaration, and dereference)

Re: Perl's decline was cultural

#210
post #171

Earlier quoted context omitted.

Couldn't they have figured out one decent way to do things before releasing features to all users? I tried Scala for a bit then decided it was complicated for no good reason. Idk about Haskell, but I used Erlang which is also purely functional. No matter how long I used it and tried to appreciate its elegance, it became clear this isn't a convenient way to do things generally. But it was designed well, unlike Scala.

Erlang is, by my accounting, not even a functional langauge at all. It takes more than just having immutable values to be functional, and forcing users to leave varibles as immutable was a mistake, which Elixir fixes. Erlang code in practice is just imperative code written with immutable values, and like a lot of other modern languages, occasional callouts to things borrowed from functional programming like "map", bu…

> Erlang is, by my accounting, not even a functional langauge at all.

How do you figure?

The essence of FP is functions of the shape `data -> data` rather than `data -> void`, deemphasizing object-based identity, and treating functions as first-class tools for abstraction. There's enough dynamic FP languages at this point to establish that these traits are held in common with the static FP languages. Is Clojure not an FP language?

> It takes more than just having immutable values to be functional, and forcing users to leave varibles as immutable was a mistake, which Elixir fixes.

All data in Elixir is immutable. Bindings can be rebound but the data the bindings point to remains immutable, identical to Erlang.

Elixir just rewrites `x = 1; x = x + 1` to `x1 = 1; x2 = x1 + 1`. The immutable value semantics remain, and anything that sees `x` in between expressions never has its `x` mutated.

> Erlang code in practice is just imperative code written with immutable values, and like a lot of other modern languages, occasional callouts to things borrowed from functional programming like "map", but it is not a functional language in the modern sense.

I did a large amount of Scala prior to doing Erlang/Elixir and while I had a lot of fun with Applicative and Monoid I'm not sure they're the essence of FP. Certainly an important piece of the puzzle but not the totality.

Post reply on HN