On Mon, Feb 19, 2018 at 8:36 PM, Antoon Pardon <antoon.par...@vub.be> wrote:
> On 17-02-18 21:11, Chris Angelico wrote:
>> On Sun, Feb 18, 2018 at 1:47 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote:
>>> On Fri, Feb 16, 2018 at 9:32 PM, Chris Angelico <ros...@gmail.com> wrote:
>>>> You'd be surprised how rarely that kind of performance even matters.
>>>> The author of that article cites C# as a superior language, but in the
>>>> rewrite from C# to Python (the same one I mentioned in the other
>>>> post), I sped the program up incredibly. Part of that is because C#
>>>> requires the startup of its framework (in my case that's Mono) just as
>>>> Python does, and partly it's because the simplicity of Python let me
>>>> eliminate a number of unnecessary HTTP requests. Trust me, your choice
>>>> of language doesn't help you if it means you do three (sequential)
>>>> HTTP requests when one would have done. Clean code has its own
>>>> advantages.
>>> Okay, I'm curious. How did C# force you to make extra HTTP requests
>>> that were no longer necessary when you rewrote in Python?
>> It didn't *force* those requests to be made, but the code was so large
>> and convoluted that I doubt its original author realized that the
>> requests were being repeated. Pseudo-coded:
> But was that a reflection on C# or on the original author?

A bit of both. It's the language's fault that simple operations take
dozens of lines of code, and the author's fault for not noticing the
redundancies. It's virtually impossible to keep thousands of lines of
code in your head, so the language's lack of good primitives increases
the complexity of the code and thus allows redundancy to lie hidden.

But my main point in the original post was that C# cannot possibly
*help* if most of the time is spent in HTTP requests. I could have
naively transformed the code into Python without seeing any measurable
performance drop, despite Python being "slower" than C#. Makes no
difference what language you write in, if you're waiting on the


Reply via email to