4 ms·
> it is not the notorious "write only" language that many troll it to be I dispute that. I have worked with many languages, and Perl has always been one of th
by jfkebwjsbx 6y ago
> it is not the notorious "write only" language that many troll it to be
I dispute that.
I have worked with many languages, and Perl has always been one of the hardest to remember due to non-standard symbol abuse and a few strange semantics.
There is a reason it has that reputation.
Even writing it isn’t easy. I can describe the Python syntax after years of not using it. Perl? No way I remember it.
- py_or_dy 6y agoUnderstood. I stated that to say my problems with perl is not the language itself. To say it is the "community" is not right either. But basically "what is left of the community" is the issue. Languages like python, ruby, perl, etc are only good (if you want to freelance and make money at least) at being a "skin" around a database. That also entails a knowledge of frontend frameworks and workflows as well. Yet the words "database", "javascript", or "webpack" are very rarely mentioned at any of the perl conferences in the last 5 years! In the case of webpack, that's probably never been mentioned.
- domm_plix 6y agoWell, I've given talks on databases (Postgres), javascript (vue) and modern devops (k8s etc) at various Perl conferences in the last years, so I cannot agree. In fact, I'm giving a small talk on Docker today at the Perl Conference in the Cloud, and also a lightning talk about a ~50 line tool to provide an async web server to post to Matrix. https://tpc20cic.sched.com/ https://tpc20cic.sched.com/ Yes, there are a few people entrenched in old ways (and sometimes it pays off to not always use the newest tech), but there are also a lof of Perl devs doing current stuff.
- gbacon 6y ago> I have worked with many languages, and Perl has always been one of the hardest to remember due to non-standard symbol abuse and a few strange semantics. For example?
- cogman10 6y agoI mean, the combinations of $%@ are really astoundingly bad. $ alone has so many different meanings and operations depending on context. You won't find that sort of thing in any other language. Not even PHP which for some bizarre reason brought $ along for the ride. Here's a fun exercise, write a dictionary of arrays. Now write a dictionary of 2d arrays. In any other language, that's hardly a challenge to both read and write such a structure. Not so with perl.
- edoceo 6y agoI think shells did $ for vars first, then Perl added @ and % for arrays and hashes (and then $ was refs)
- fgasper 6y ago> Here's a fun exercise, write a dictionary of arrays. Umm … ok: my %dict = ( foo => [ 1, 2, 3 ], bar => [ 4, 5, 6 ], ); > Now write a dictionary of 2d arrays. my %dict2d = ( foo => [ [1, 2, 3], [4, 5, 6] ], bar => [], ); It’s pretty much identical to JS. Not sure how that’s supposed to exemplify how hard it is to write Perl.
- amirkdv 6y agoI'm not the original comment author, neither am I fluent in Perl. But I suspect they meant nested hashes and not a hash whose values are arrays of arrays. As you point out, the latter is trivial. To be clear, even a nested hash is all well as long as the depth and the keys are literals (as in your example). It is when keys are dynamic that things get unruly. And god forbid if the _depth_ of nesting is dynamic. All of these are trivial to implement in Python, Ruby, JS, PHP, ...
- theshrike79 6y agoThe problem is that it takes a lot of skill to write elegant Perl. The easy way is the one that produces write-only crap.
- carlmr 6y agoThe problem with any language like this is that you have to work with others, and if others produce write only code that's your problem, too.