# Design Philosophy On Data And Semantics

DevFeed: [Design Philosophy On Data And Semantics](<https://devfeed.tech/articles/design-philosophy-on-data-and-semantics-22126.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2017/06/design-philosophy-on-data-and-semantics.html>)

Published: 2017-06-08T00:00:00Z

Content type: opinion

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Code](<https://devfeed.tech/topics/code.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [escape-analysis](<https://devfeed.tech/tags/escape-analysis.md>), [gc](<https://devfeed.tech/tags/gc.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [integrity](<https://devfeed.tech/tags/integrity.md>), [memory](<https://devfeed.tech/tags/memory.md>), [mental-models](<https://devfeed.tech/tags/mental-models.md>), [pointers](<https://devfeed.tech/tags/pointers.md>), [programming](<https://devfeed.tech/tags/programming.md>), [readability](<https://devfeed.tech/tags/readability.md>)

## AI overview

The final post in a four-part series on Go language mechanics discusses how value and pointer semantics affect stack and heap allocation, garbage-collector pressure, copying, and efficiency. It argues that using consistent semantics for a given data type improves code integrity, readability, and maintainable mental models.

## Source excerpt

Prelude This is the final post in a four part series discussing the mechanics and design behind pointers, stacks, heaps, escape analysis and value/pointer semantics in Go. This post focuses on data and the design philosophies of applying value/pointer semantics in your code. Index of the four part series: Language Mechanics On Stacks And Pointers Language Mechanics On Escape Analysis Language Mechanics On Memory Profiling Design Philosophy On Data And Semantics Design Philosophies "Value semantics keep values on the stack, which reduces pressure on the Garbage Collector (GC). However, value semantics require various copies of any given value to be stored, tracked and maintained. Pointer semantics place values on the heap, which can put pressure on the GC. However, pointer semantics are efficient because only one value needs to be stored, tracked and maintained." - Bill Kennedy