# Why use properties instead of setters/getters?

**URL:** https://community.keyboard.io/t/why-use-properties-instead-of-setters-getters/514
**Category:** Programming
**Created:** [October 24, 2017, 1:13pm UTC](https://community.keyboard.io/t/why-use-properties-instead-of-setters-getters/514 "2017-10-24T13:13:12Z")
**Posts on this page:** 1
**Showing post:** 20

<div class="post-metadata">

### Author: ![noseglasses](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/noseglasses/32/429_2.png) [@noseglasses](https://community.keyboard.io/u/noseglasses)
#### Post date: [December 16, 2017, 6:20pm UTC](https://community.keyboard.io/t/why-use-properties-instead-of-setters-getters/514/20 "2017-12-16T18:20:22Z")

</div>

> [@algernon](#):
>
> Code size, mostly. Setters/getters have a small amount of PROGMEM and SRAM cost,

See also

> [@Do accessors increase PROGMEM consumption?](https://community.keyboard.io/t/do-accessors-increase-progmem-consumption/865):
>
> There were discussions about the benefits of accessor functions [[1](https://community.keyboard.io/t/kaleidoscopes-implementation-possible-improvements/851/19)], [[2](https://community.keyboard.io/t/single-byte-key-addressing-for-boards-with-fewer-than-256-keys/848/9)], [[3](https://community.keyboard.io/t/why-use-properties-instead-of-setters-getters/514)]. Apart from religious aspects of the discussion, the statement that accessors cause runtime costs appeared quite often. This is something that is hard to get out of the heads of programmers coming from other languages that do not feature function inlining, C programmers included. But C++ has its own rules. Inline functions can actually disappear from the assembly and thus from our precious PROGMEM. C++'s inline keywo…

---

_[View the full topic](https://community.keyboard.io/t/why-use-properties-instead-of-setters-getters/514)._
