4 ms·
William Kennedy has an excellent post on this https://www.ardanlabs.com/blog/2017/06/design-philosophy-on-data-and-semantics.html https://www.ardanlabs.com/blog
by SomaticPirate 6y ago
William Kennedy has an excellent post on this https://www.ardanlabs.com/blog/2017/06/design-philosophy-on-data-and-semantics.html 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.
- DabbyDabberson 6y ago> 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.