Hacker Newsnew | past | comments | ask | show | jobs | submit | rflynn's commentslogin

I've been writing non-functional programs for years.


Simple. Incentivize existing programmers to get a sex change.


Good stuff. I was playing around with ordinality of language built-ins recently and found unintuitive results for Python (https://github.com/rflynn/wat/blob/master/src/py.ord.png). As your article mentions there is a fine line between language and implementation detail.

    >>> u"" > () > "" == u""
    True


http://docs.python.org/library/stdtypes.html#comparisons

CPython implementation detail: Objects of different types except numbers are ordered by their type names; objects of the same types that don’t support proper comparison are ordered by their address.


Worth mentioning that this was fixed/removed in Python 3.x

  >>> "" > ()
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  TypeError: unorderable types: str() > tuple()


The most interesting data for me is the timeline near the bottom and it's the one thing they didn't illustrate.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: