Perl's decline was cultural
201–210 of 472 posts
Re: Perl's decline was cultural
#202It doesn't feel like I've missed out.
Re: Perl's decline was cultural
#203Earlier 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.
Re: Perl's decline was cultural
#204Should 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.
Re: Perl's decline was cultural
#205Earlier 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?…
Re: Perl's decline was cultural
#206But 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
#207Nowhere 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
#208Earlier 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.…
Re: Perl's decline was cultural
#209Earlier 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.*
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
#210Earlier 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…
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.