Ide vs ide

Chris Angelico rosuav at gmail.com
Sat Oct 28 15:22:32 EDT 2017


On Sun, Oct 29, 2017 at 6:10 AM, Stefan Ram <ram at zedat.fu-berlin.de> wrote:
> Rustom Mody <rustompmody at gmail.com> writes:
>>Useful python programs are often small; even tiny
>
>   We must not forget that tiny programs are just large
>   problems with the size masterfully hidden.
>
>   For example, the »print« of Python is actually implemented
>   by a subprogram (in C or Python) which invokes other subprograms.
>
>   If we would add the listing to all subprograms invoked
>   during the execution of a small Python script such as
>
> print( 2 )
>
>   , it would become much larger.
>
>   So this serves to illustrate
>
>      "Fools ignore complexity.
>       Pragmatists suffer it.
>       Some can avoid it.
>       Geniuses remove it."

At which point you're just arguing levels of abstraction. If someone
comes to me and says, hey look, I can do all this numerical
computation and analysis in one line of simple code, I won't argue
that it's not really "one line" just because it depends on Pandas -
I'll agree with him/her on the basis that Pandas grants you an
extremely high level of abstraction for data manipulation. That print
function does a lot of work, yes, but logically it does one thing: it
prints stuff out.

Tiny Python programs are still tiny in terms of elegance and
readability. And the CPython interpreter has over four hundred
separate files full of unit tests to help ensure that the lower
abstraction layers are correctly representing the intent of the higher
layers.

ChrisA



More information about the Python-list mailing list