I am a semi-advanced hobbyist. I have a BSCEE degree, but no professional programming experience. I have been programming for > 30 years and have written small programs in easily 20+ different languages during that time. So, while not a professional programmer, I am not exactly a novice.
I've been following some of the contracts proposal discussions and frankly I have been a bit lost. I think I have a good handle on interfaces, but this contracts stuff confuses me. One of Go's strengths is that the language is relatively easy to grasp. The code is generally relatively straightforward. People seem to draft code that leans more toward readability instead of toward "clever" but less easily understood. I have looked at the source code of many packages. It is rare that I cannot follow the code. I cannot say this about many other languages. My fear is this contracts proposal will kill my ability to read and understood code of others. I recall using generics many years ago in Ada and did not recall them being so confusing. So, I went back and looked at the Ada implementation. See, e.g., https://en.wikibooks.org/wiki/Ada_Programming/Generics. Honestly, I find this general approach to be easier to follow than contracts. Based on the link, it has some similarities with C++ templates. I have some basic experience with C++, but I have no experience with C++ templates. TLDR; So why contracts and not templates or something else? Is there a benefit to contracts that I don't appreciate (very likely, cause I don't understand them)? Are there issues with a template approach? If this has been addressed elsewhere, please provide links. I'd like a better understanding as to why the Go team has chosen to explore contracts over other approaches. Jeff -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.