question of style

Aahz aahz at pythoncraft.com
Sat Jul 4 00:47:30 EDT 2009


In article <7xhbxtjxtn.fsf at ruckus.brouhaha.com>,
Paul Rubin  <http://phr.cx@NOSPAM.invalid> wrote:
>Simon Forman <sajmikins at gmail.com> writes:
>> 
>> (I like Haskell's Maybe, but saying A is better than B doesn't imply
>> that B is therefore terrible.)
>
>I wouldn't say Python's None is terrible, but the programming style in
>which None is used as a marker for "absent value" is genuinely a
>source of bugs, requiring care when used.  Often it's easy to just
>avoid it and all the bugs that come with it.
>
>Haskell's Maybe type, ML's Option type, and various similar constructs
>in other recently designed languages all are responses to the
>shortcomings of None-like constructs in older languages.  I'm not
>going purely by that one guy's blog post, though I do think that post
>was pretty good.

AFAICT, in order for Maybe and Option to work, you need to have some
kind of static typing system.  Am I missing something?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"as long as we like the same operating system, things are cool." --piranha



More information about the Python-list mailing list