Re:Learn Go: Hand-crafted Go exercises and examples
by SomaticPirate on Saturday May 16, 2020 @07:59PM
(#23208224)
William Kennedy has an excellent post on this https://www.ardanlabs.com/blog/2017/06/design-philosophy-on-...
As someone who has written (and read) a decent amount of Go the value vs pointer semantics of the function informs me of how the creator intends for the type to be used. Seeing pointer receivers informs me that there is an expectation of modifying the state while value pointers (which are thankfully more common) return a copy of the data.
[ Parent
| on HN ]
Re:Learn Go: Hand-crafted Go exercises and examples
by DabbyDabberson on Sunday May 17, 2020 @04:53AM
(#23210656)
> Tom has also mentioned that a box of copy paper can hold 100k lines of code.
that comes out to 20 loc per 8.5x11 piece of printer paper.
I feel like that's nearly an order or magnitude too low.