I'm trying to heed your advice about the advantages of value types but I need to store dates. How do you handle this?
Conversation
is there a good Swift date struct? Or shall I store ISO 8601 Strings and write some utility functions in my object layer?
1
Replying to
I'd just use NSDate—it's already a value type for all intents and purposes.
Replying to
because it's immutable right? Nothing's going to change it under me. Once I've got a given NSDate then it's always the same
1
Yeah, and it's inert—no NSDate method is going to execute without you calling it. Also interchangeable.
1

