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 8967933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:21:24+00:00 2026-06-15T17:21:24+00:00

I am wondering as to why Date structures & objects, like C#’s DateTime &

  • 0

I am wondering as to why Date structures & objects, like C#’s DateTime & Obj-C’s NSDate have been made immutable.

Im looking for the reasoning behind this design and the benefits of making this information immutable, not just “because they can”

UPDATE:
It seems as though there was a similar question with a fantastic answer to mine but specifically targeting Java, it can be found here: Why do we need immutable class?

That in combination with the answer to my question has been very informative

  • 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-06-15T17:21:25+00:00Added an answer on June 15, 2026 at 5:21 pm

    Immutability makes a lot of things easier. If you don’t have to worry that something can change underneath you, then there is a lot of guard code you don’t have to write. There’s a lot of assumptions you don’t have to make. There’s a lot of possibilities for things to NOT go wrong.

    It’s common for strings, dates, and other kinds of common objects to be immutable in modern languages because it simplifies the compiler, the framework, and means the compiler is free to make assumptions when doing optimization.

    The gist is that, for a small price (having to create a new object if you want to change the value) you get a lot of real performance, stability, and reliability.

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

Sidebar

Related Questions

I was wondering if anyone would help with the following: I have a date
I am wondering what is the best way, given a TreeSet of Date objects,
I have a class which calculates a date and I'm wondering how best to
I am wondering why OpenERP's date and datetime fields are limited with years? If
Just wondering how I would insert the date 01/01/4000BC into oracle Have tried the
I was wondering how to format a date like this: 15 Jun 2012 23:02:10
I'm wondering what is the date when Microsoft will stop supporting .NET CF 1.0.
I was wondering if there is a way, using PHP, to change this date
Hey, I'm just wondering how to convert a numerical date into text format in
Wondering if any of you can help me: I've made a signup modal that

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.