[Haskell-cafe] What is your favourite Haskell "aha" moment?

Joachim Durchholz jo at durchholz.org
Fri Jul 13 06:47:56 UTC 2018


Am 13.07.2018 um 01:40 schrieb Tony Morris:
> On python, we are fixing it (WIP):
> https://github.com/qfpl/hpython

Some poisonous aspects of Python are unfixable.
E.g. having declarations as program-visible update to a global state 
causes all kinds of unnecessary pain, such as having to deal with 
half-initialized peer modules during module initialization.

> Did you see the recent "default mutable arguments" post?
> https://lethain.com/digg-v4/

Yeah, the "default parameter is an empty list but that's then going to 
be updated across invocations" classic.
Other languages have made the same mistake. Default data needs to be 
either immutable or recreated on each call.
Such mistakes can be mitigated, but they cannot be fixed while staying 
backwards-compatible.

Python actually did an incompatible switch from 2 to 3, but for some 
reason Guido didn't fix the above two, or some other things (such as 
Python's broken idea of multiple inheritance, or the horribly 
overcomplicated way annotations work).
Python is nice for small tasks. If you accept its invitation to extend 
it you get fragility (due to the inability to define hard constraints so 
whatever you extend will violate *somebody's* assumptions), and if you 
scale to large systems you get fragility as well (because Python 
modularization is too weak).

Well, enough of the off-topic thing here.

> On 07/12/2018 07:58 PM, Brett Gilio wrote:
>> Python is poison, indeed. ;)


More information about the Haskell-Cafe mailing list