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

Obviously the closest thing in the general sense to Python is Ruby. But I think a case can be made that in practice, the closest thing to Python on the static language side is Go. The list of superficial differences is a mile long, I don't deny, nor will I exhaust my audience's patience with actually writing them out. But the interface orientation of Go captures the essence of how you design in Python surprisingly well. Of all the static languages, Go has the closest thing to duck typing, in particular the ability to declare a "duck type" for an existing third-party thing that you don't want to or can't change, and integrate it into your code as a compile-time checked member of that "duck type".


Really? Swift feels so much closer than this.


very true! to be a WriteCloser[1], you have to be able to Write[2] and to Close[3]. quacking confirmed.

1. https://pkg.go.dev/io#WriteCloser

2. https://pkg.go.dev/io#Writer

3. https://pkg.go.dev/io#Closer




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

Search: