1

Quoting the Swift Programming Language Guide :

Extensions can add new computed properties, but they cannot add stored properties, or add property observers to existing properties.

Why is that ? What's the technical or logical reason behind this ?

Ambroise Collon
  • 3,839
  • 3
  • 18
  • 37

1 Answers1

3

In simple words

Because properties need storage, adding properties would change the memory structure of the class

Prashant Tukadiya
  • 15,838
  • 4
  • 62
  • 98