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

So not only does a type have to "accidentally" implement an interface, but also a programmer has to explicitly write code that has a value of that type in scope, and pass it to a function in a wildly different domain.

Sounds very much like only a theoretical gotcha.



It is a theoretical gotcha like writing unsafe code in C is.

Sure it is easy to avoid such gotchas in small code bases, handled by two or three programmers.

Scale it up to the typical sizes of enterprise projects, maintained by generation of programmers in distributed teams, with a goal of at least 10 years deployed in production and those gotchas happen all the time.


Reckon that class of bug has occurred often in large opensource Go projects?


Given that I am not an Oracle for large opensource Go projects, the answer is I don't know.

However it plays a role which programming languages I will advise our customers to use.

Currently I only advise the use of Go for those customers that need to work with Docker or K8s.




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

Search: