Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Idk, maybe because your arguments are bit shallow?

I like 'self'. There's a lot to complain about magical 'this' of every other language - especially in Javascript. Specifying self makes it really clear if it's a member method or a standalone function.

Python really likes the idea of 'seek forgiveness, not permission', aka. abusing try/except. But it's kind of nice:

  # seek permission
  if 'key' in map:
      fn(map['key'])
  else:
      whatever()

  # seek forgiveness
  try:
      fn(map['key'])
  except KeyError:
      whatever()
Just pray that 'fn()' doesn't also throw a KeyError.


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

Search: