Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6101349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:29:23+00:00 2026-05-23T13:29:23+00:00

Why should someone ever use the non-NSMutable equivalents of the data structures in Objective-C?

  • 0

Why should someone ever use the non-NSMutable equivalents of the data structures in Objective-C? When it’s a situation when you need a const object that should not be modified? Does using non-NSMutable classes improve performance in any way? Any other situations?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:29:24+00:00Added an answer on May 23, 2026 at 1:29 pm

    The two main reasons off the top of my head:

    • An object returning a property can be certain nobody will alter it if it’s immutable. The object can therefore return the original instead of making copies all the time. So it’s a memory and performance benefit.
    • When writing your own immutable objects, it’s very easy to be thread safe. That naturally flows into being able to write multi-threaded functional-style code which is reasonably efficient and error free.

    You also tend to see arguments in favour of the inherent preservation of the original value being useful, especially in terms of semantics and design patterns.

    Immutable classes don’t tend to be much more efficient in and of themselves with one exception — if you take an immutable copy of a mutable array, for example, then it’s clear exactly how much storage is needed and exactly that much can be allocated. Because memory allocation costs time, mutable collections tend to keep some spare storage around because they can’t predict how they’re going to grow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When should someone use structs instead of classes or vice versa in C++? I
Someone asked me the other day when they should use the parameter keyword out
What should someone know as an Entry Level, Mid-level, and Senior Developer working with
Where should I point someone to learn the basics of HTML/CSS? I personally got
I think it should be 01 but someone says its undefined, any reason for
I remember someone saying if you create a class through a lib you should
I have a three tier set-up. Someone suggested I should get the ConnectionString from
The title is a bit long, but it should be pretty straightforward for someone
In this thread some one commented that the following code should only be used
I currently have a listing of data that has a randomly generated order listing.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.