Live data from Hacker News

Perl, the first postmodern computer language (1999)

wall.org

91–100 of 225 posts

Re: Perl, the first postmodern computer language (1999)

#91
Modernism:

"Less is more"—Mies van der Rohe

Postmodernism:

"Less is a bore"—Robert Venturi

—————

Guided by these famous quotes, if I were to call a programming language a "Modernist" language, I'd think of something that prizes elegance. It can't just be a small language, it has to be a small language with a few features powerful enough to actually do more.

I would think of languages like Scheme or Smalltalk or C as fitting that label. But not JavaScript or Java or C++.

And if I were to call a language "Postmodernist," I'd expect a language to incorporate historical motifs, whimsey/surprise, and arresting/attention-grabbing features.

Perl might fit that bill. C++ manages to be "more" without being postmodernist, IMO.

Re: Perl, the first postmodern computer language (1999)

#92

Earlier quoted context omitted.

> Readability of code is paramount. For almost all languages, Perl included, this onus is mainly on the programmer. You can churn out gritty spaghetti in almost any language. Perl code doesn't have to look like what Perl programmers put out in the 90s. It's an old misconception that people refuse to let go of.

> You can churn out gritty spaghetti in almost any language. I hate this argument because it doesn't allow for any variation in the intrinsic readability of languages, or the style those languages encourage. Yes, you can write shitty code in any languages, but some languages encourage it, while other languages discourage it. I would say that Perl encourages unreadableness more than any of its peer languages, and the…

I'm there with you. Taken to the extreme, this is why we don't use assembler for everything. I mean, it's Turing complete, right? And you can write readable assembler, true? And yet, we don't, largely because it's much easier to express large systems in other languages that are easier to write, read, and reason about.

OK, so Perl isn't assembler. Still, it's a lot easier to write unreadable code in Perl than it is in some of its contemporary languages. You don't have to, sure. You could write clean, pretty Perl code. I know, because I've seen it. But in my experience, that definitely wasn't the common case.

Re: Perl, the first postmodern computer language (1999)

#93
post #88

Earlier quoted context omitted.

> reading other people’s dialects can be quite difficult. That is why we send any code that cannot be read by a fresh CS grad back for rework. It turns out you can solve everything with very basic and straightforward syntax. But then we also don't use perl.

By the time I was done writing Perl, my Perl looked a lot like Python. It's also why I'm not really all that sympathetic to "but $NEWLANG doesn't let me write something that extracts from a hash and then map all the elements with an inline anonymous function, filter the results, and then invoke them all and put the results in a single array all in one line!". I worked for decades, plural, in languages that did permit…

> but $NEWLANG doesn't let me write something that extracts from a hash and then map all the elements with an inline anonymous function, filter the results, and then invoke them all and put the results in a single array all in one line!

Isn’t this what APL/J/Q are for?

Re: Perl, the first postmodern computer language (1999)

#94

Earlier quoted context omitted.

hah - "peak idiom" for that was when Mr Marketing and Sales from Hawaii, Guy Kawasaki, said that on stage to a bunch of developers. I heard it. It was because the Marketing and Sales-turned "software leaders" couldn't read a regex.

I write regex all the time and I can't read a regex. It's a powerful tool and that's a very valid complaint about it.

A regex can be difficult to parse, especially if it is very involved, but in Perl at least, there are ways to make it much easier ( using the /x modifier, for example : https://perldoc.perl.org/perlre#%2Fx-and-%2Fxx ). Comments and and having the regex itself be multiline can make things better, especially if you are creating a particularly complicated one.

Damian Conway highly recommends using the combo of 'xms' his Perl Best Practices Book ( https://www.oreilly.com/library/view/perl-best-practices/059... ).

The revised and considerably newer "Modern Perl Best Practices" video series on O'Reilly's learning platform is particularly good also ( https://www.oreilly.com/library/view/modern-perl-best/978149... ) - with lots of discussion of regexes.

Re: Perl, the first postmodern computer language (1999)

#95
post #91

Modernism: "Less is more"—Mies van der Rohe Postmodernism: "Less is a bore"—Robert Venturi ————— Guided by these famous quotes, if I were to call a programming language a "Modernist" language, I'd think of something that prizes elegance. It can't just be a small language, it has to be a small language with a few features powerful enough to actually do more. I would think of languages like Scheme or Smalltalk or C as…

p.s. This is fun. So what constitutes a Brutalist programming language?

It should be something that:

- Exposes the construction materials

- Implies mass and permanence

- Is usually institutional, e.g. libraries, government buildings, public housing. Only rarely shopping centres or company head offices (which were usually done in the "International" style when Brutalism was a thing).

What fits that bill? How about SQL?

Re: Perl, the first postmodern computer language (1999)

#96

Earlier quoted context omitted.

I write regex all the time and I can't read a regex. It's a powerful tool and that's a very valid complaint about it.

Part of the fun of regex is learning to make sense of what looks like black magic I imagine asm programmers feel the same way fwiw I think this world needs less "it's too hard for me" and more "let me roll up my sleeves and dig into this"

> fwiw I think this world needs less "it's too hard for me" and more "let me roll up my sleeves and dig into this"

I’m gonna need a hell of a lot more of my time back for that.

Re: Perl, the first postmodern computer language (1999)

#97

...to this day, I still can't wrap my head on how PHP even got to exist in a world where Perl was already filling the web niche just fine. Also, if they wouldn't have made it too-weird-for-math-and-physics people, Perl would've probably filled Python's niche too. And with that kind of resources focused on it, Perl 6 could've actually turned up into a clean nice new language that would've unified us all by also suppor…

As I recall, PHP just seemed blazing fast compared to Perl, and most web hosts already had it installed in Apache. Further, many web hosts didn't even allow CGI due to security issues.

Re: Perl, the first postmodern computer language (1999)

#98
post #59

Perl was the first language I used professionally and I used it almost exclusively for years. I don't understand all the negative comments about its use of sigils, I find them useful and I never got the impression that they made the code less readable but maybe that's because I was never taught the gospel of computer science :) I also appreciate the extended backwards compatibility. I still occasionally run decade-ol…

Larry Wall said once that he added sigils in Perl so he could freely add features to the language without conflicting with other's peoples variable names. It's a language design choice that makes sense for Perl's maximalism approach to features.

Perl is very well thought out, in a way that I don't think gets enough credit. For example, the three loop controls (next, last, redo) are four letters long, which makes remembering them easier. In a world where I sometimes have to jump between languages I haven't used in a while, and I'm always forgetting what arbitrary word choice this particular language used for a feature, it's nice to come back to Perl and have a language where the grammar is a little bit less arbitrary.

Re: Perl, the first postmodern computer language (1999)

#99
post #4

Earlier quoted context omitted.

Saying that to a lingüist it's... interesting. On Perl, CPAN was and it's still amazing, and lots of stuff came from that. For example, Mojolicious for the web, BioPerl for bioinformatics and Rivescript to write silly chatbots, among others. Oh, and pkg_* under OpenBSD. INB4 gen-z's rant on "PeRl It'S UnRead@ble", check the intro from "perldoc perlintro". EDIT: Unless I'm sure the deleted link it's right, I'd avoid p…

I'm more than two decades away from being gen-z, and I still agree with that sentiment. There might be that theoretical wise and disciplined Perl programmer writing well structured and readable code, but wherever I interfaced with people writing/maintaining Perl code, it was the most hastily thrown together crap that once was a small tool that "just worked" and then slowly grew completely out of hands over the years.…

> I'm more than two decades away from being gen-z, and I still agree with that sentiment.

Can’t really be a comment without a aside-from-the-point slurring

Re: Perl, the first postmodern computer language (1999)

#100
post #86

Earlier quoted context omitted.

Pretty sure there's a way to load perl as a webserver module like PHP, then you can do that embedded stuff too

Yes, but that stuff came later. It's actually the first way I used Perl on the web, but by then PHP was off to the races. You could even get modules that would allow you to inline Python just like PHP, although the interaction between that and mandatory indentation could get a bit "interesting". Also perhaps ironically, this style of mixing code and HTML has generally come to be regarded as an antipattern. PHP may st…

> Also perhaps ironically, this style of mixing code and HTML has generally come to be regarded as an antipattern.

Tell that to the React world :P

Post reply on HN