Sujet : Re: Why Python When There Is Perl?
De : bowman (at) *nospam* montana.com (rbowman)
Groupes : comp.os.linux.advocacyDate : 22. Mar 2024, 03:46:48
Autres entêtes
Message-ID : <l64688F2m1hU3@mid.individual.net>
References : 1 2 3 4 5
User-Agent : Pan/0.149 (Bellevue; 4c157ba)
On Thu, 21 Mar 2024 06:04:13 -0000 (UTC), Lawrence D'Oliveiro wrote:
On 21 Mar 2024 05:36:18 GMT, rbowman wrote:
I'm looking at some C code using the OpenSSL library to connect to a
host/port, do a HTTPS transaction. and return the result. There's a
generous amout of error checking and handling and it's 84 lines rather
than 1.
You can do it in Python, leave most of the error checking to the default
settings, and end up with maybe a dozen lines of code.
Yes you can, but my point was somebody else did all the grunt work to
allow you to do it in a few lines of Python. TANSTAAFL. The further point
is after you've done it once in C you now have a file or library that
allows you to do the same in a few lines of C unless you insist on
reinventing the wheel.