Python is going to be hard

Ethan Furman ethan at stoneleaf.us
Thu Sep 4 00:06:45 EDT 2014


On 09/03/2014 08:22 PM, Rustom Mody wrote:
> On Thursday, September 4, 2014 7:26:56 AM UTC+5:30, Chris Angelico wrote:
>> On Thu, Sep 4, 2014 at 11:48 AM, Rustom Mody wrote:
>>>>>> NO PRINT
>>> Yes, or the OP could work with actual saved .py files and the
>> reliability that comes from predictable execution environments... and
>> use print. Why are you so dead against print?
>> Here is the most recent (2013) ACM/IEEE CS curriculum:
> www.acm.org/education/CS2013-final-report.pdf
>> It is divided into tiers with core-tier1 being the bare minimum that
> all CS graduate need to know.
>> One of (the many!) things there is this (pg 158)
>> | Functional Programming (3 Core-Tier1 hours)
>> | Effect-free programming
> | -- Function calls have no side effects, facilitating compositional reasoning

Lots of Python functions have side effects.
> | -- Variables are immutable, preventing unexpected changes to program data by other code

Lots of Python core data types are mutable.
> | -- Data can be freely aliased or copied without introducing unintended effects from mutation

Every mutable Python data type that is aliased can be affected by unintended mutational effects -- as well as 
intentional ones.
> So to answer your question: print statements are side-effecting and therefore obstruct
> compositional reasoning.

Ridiculous argument after ridiculous argument. Please do not waste our time with nonsense.
--
~Ethan~


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /