What is the advantage of using structs?

Structs are marginally faster at runtime than classes , due to optimisations done by the compiler. You can enforce full immutability. If you declare a struct instance as let, you will not be able to change its properties.

Sizin İçin Seçtik  What is the similarity between enum union and structure *?

Leave a Reply

Your email address will not be published. Required fields are marked *