|
|
Log in / Subscribe / Register

Replacing AWK with Python in GCC?

Replacing AWK with Python in GCC?

Posted Jul 29, 2018 18:23 UTC (Sun) by ofranja (subscriber, #11084)
Parent article: Replacing AWK with Python in GCC?

I did not have a strong opinion about this until I read the email containing the arguments and proposed solution, and looked at the original code.

IMHO, the awk version easier to read. Sure, it has more duplication, but one can easily abstract awk code (hint: it supports functions and there are ways to encapsulate data in arrays). Bad/redundant code can be written in any language. The python version has tons of details that require a deeper knowledge of python as well and is not necessarily easier to work with.

Also, not everyone can (or want to) afford extra ~130MB of storage just to process some text.

In my opinion, putting some effort to improve the awk version would probably be a better solution in the long term.


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds