If your variable and function names don't explain what is going on, you will encounter a big maintenance problem with your code as non-updated comments contradict your unreadable code.
Very occasionally I find a use for attention-grabbing comments, number one for this, and personally I consider this to be a flaw in the design of Go's type struct and interface{} syntax is to isolate unimplemented code in superclasses. In my code I use somewhat space-consuming commentary to show the head and tail of the section that contains all the skeleton functions required to allow parametric polymorphism and composition/inheritance. I think it is a good case to argue that type struct should have three sections, first, the struct variable elements, second for the template function signatures, and third for the implementations. Well, I would even suggest it should have a section for 'dummy' functions. Or maybe some indicator in the interface that means the code will not run without a composition overlaid to implement these functions. It's not a dealbreaker for me, but I don't think the flexibility, while there is a syntactic constraint that there must be a function declaration for any function called, that requires what amounts to dumb boilerplate, will remain in the Go spec down the track. On Friday, 20 April 2018 03:18:40 UTC+3, matthe...@gmail.com wrote: > > gofmt and godoc remove choices that are fun, artistic, or tempting, but > distracting. I think you'll be best served by Go without the box. > > Matt > > On Thursday, April 19, 2018 at 6:42:40 PM UTC-5, Chris FractalBach wrote: >> >> Test #1 >> Source: >> /* >> +----------------------------------+ >> | fancy box | >> +----------------------------------+ >> package goexplore explores Go! >> */ >> package goexplore >> >> Result: >> >> >> <https://lh3.googleusercontent.com/-4-rmB5_0E-Y/Wtkonu91XQI/AAAAAAAAAJI/89Zk8GOAn3YQ-WX99F5CzUVhJrYBUmwMACLcBGAs/s1600/1.PNG> >> >> >> >> Test #2 >> Source: >> /* >> +----------------------------------+ >> | fancy box | >> +----------------------------------+ >> */ >> >> /* >> package goexplore explores Go! >> */ >> package goexplore >> >> >> Result: >> >> >> <https://lh3.googleusercontent.com/-9-YoHi13uDQ/WtkpJq0IPqI/AAAAAAAAAJQ/0sejSD98dX421KfGLOzdGHvUMVcVbJk2ACLcBGAs/s1600/2.PNG> >> >> -- 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.