4 ms·
> Yes, awk and sed were replaced by Perl, but more importantly, the unmaintainable nightmare that glued all of it together was wiped out. Er, Perl replaced an
by yjftsjthsd-h 3y ago
> Yes, awk and sed were replaced by Perl, but more importantly, the unmaintainable nightmare that glued all of it together was wiped out.
Er, Perl replaced an unmaintainable nightmare? Perl, the language infamous for being indistinguishable from line noise?
- margalabargala 3y agoYes. It's comparative. The absolute value of Perl's readability, maintainability, and general intuitiveness is massively better than all comparable tools that existed when Perl came out. Perl is a massive improvement over those tools. If you have doubts, try writing a complicated production software stack in awk. Then hand it off to a coworker. One need not be irreplaceably good, if one is already beating the current state of the art by an order of magnitude. Perl did this.
- BaseballPhysics 3y agoMoreover, as often as people joke about the readability of Perl code, that's entirely a function of the developer. I've easily written tens of thousands of lines of Perl, and not a single person has complained about difficulty reading or maintaining that code. Why? Because I apply all the usual best practices for code hygiene that apply to any language. Frankly, I think most people are just repeating a meme they heard once, and the rest just get put off by a) sigils, and b) the use of implicit variables (which I tend to use only very sparingly, and mostly in quick one-liners). But a developer that poorly names their functions or variables, fails to modularize appropriately, fails to document their code, abuses language features because they want to be excessively terse or clever, that kind of person is gonna write crappy, difficult-to-maintain code no matter what language they use. In fact, I'd argue the advent and popularity of Python--which was pretty radical in how opinionated it was at the time--is a direct response to languages like Perl and C that were a lot more free-form and easier to abuse by poor coders.
- tribby 3y agoabsolutely a response to perl. “TOOWTDI” has been an expression in the python community for a long time :)
- thesuperbigfrog 3y agoTIMTOWTDI is Python's motto for managing dependencies and deployments: https://packaging.python.org/en/latest/overview/ https://packaging.python.org/en/latest/overview/ <kidding> OCI (Docker) Containers were invented to overcome the problems inherent with deploying Python applications. </kidding>
- yjftsjthsd-h 3y ago> that's entirely a function of the developer. I would argue the same of sed/awk; you can write an unmaintainable mess, but you don't have to.
- BaseballPhysics 3y agoOh sure. IME Perl just pulls it all together into a much more convenient, all-in-one package that has all the libraries and tools you need to build anything from small scripts all the way up to large projects.
- zgluck 3y agoand not a single person has complained about difficulty reading or maintaining that code Developers extremely seldom complain about other developers' code to their faces. Instead they go to lenghts to avoid it if they dislike it severely; right or wrong.
- gpvos 3y agoAll nontrivial sed programs are line noise, there is no other way to program in it. In Perl you at least have a chance. Awk is not much more readable than Perl actually.
- anthk 3y agoGen-Zer spotted. No, Perl is not line noise. Get the Perl source code for PangZero and you'll understand proper Perl code.
- lonelyasacloud 3y agoYep, that’s how bad it was before.
- unpythonic 3y agoOh yeah! Perl sure did have a bunch of ugly programs, but I believe that was because it was so easy for non-experts to program in it. There have been many companies successfully built atop of a Perl code base, and I've seen fantastic systems built with it. I've also seen one-off programs handed from manager to manager which would scare you to death.