2 ms·
While I agree that the silent failures and "opaqueness" can be off-putting, once you understand the tool and how to implement it in your workflow it is wonderfu
by rhombocombus 7y ago
While I agree that the silent failures and "opaqueness" can be off-putting, once you understand the tool and how to implement it in your workflow it is wonderfully efficient. Aside from being syntactically terse I haven't found any compelling reasons not to use it.
- rectang 7y agoI've achieved a high level of expertise in Perl. Even though I can, I won't write complex Perl one liners; instead, I will write tested, documented utilities which someone who has not achieved such a level of mastery has a shot at grokking, maintaining and debugging. Even better if I can write such utilities in a more modern programming language like Go or Rust, if the organization has personnel with expertise in such languages.
- Chris2048 7y agoWhat if the task is one-off? would you still care to write a proper utility? As an example, you have some data you need to fix as input to some program. you incrementally try to fix it with perl: 1) run program with data, observe errors, infer what needs fixing -> 2) write perl to fix data, modify data -> 3) repeat from (1) until no errors You have no expectation you'll ever need to fix data corrupted in the same way ever again.
- 0xff00ffee 7y agorectang: "Awk, like shell, is a fraught programming environment, full of silent failure and hidden gotchas. Even for one-liners..." Also rectang: "Even better if I can write such utilities in a more modern programming language like Go or Rust..." Thank you for demonstrating how Linux decays due to lack of experience and NIH syndrome.
- jolmg 7y ago> Aside from being syntactically terse I haven't found any compelling reasons not to use it. For me, that's THE reason to use it. It's terseness is what allows it to be efficient enough to be used primarily interactively.
- rhombocombus 7y agoI wholeheartedly agree, but I think that is why a lot of folks get turned off from it.
- coliveira 7y agoThere is a school of thought in CS that equates terseness to bad programming practices. That is unfortunate. It is possible for software to be terse and well designed, and of course verbose solutions can easily morph into an unmaintainable nightmare.