immutability
If security is not an issue, is an immutable interface a good pattern?
It is commonly suggested that immutable classes should be sealed, to enforce a promise to consumers that observed properties of the class will remain invariant.Certainly that would seem a good practic[详细]
2023-04-08 16:57 分类:问答How pure and lazy can Scala be?
This is just one of those \"I was wondering...\" questions. Scala has immutable data 开发者_如何学Pythonstructures and (optional) lazy vals etc.[详细]
2023-04-07 20:21 分类:问答Should messaging classes be immutable?
When I say messaging classes I mean classes that are used strictly to get sent and be consumed by a consumer (or handler).[详细]
2023-04-07 17:08 分类:问答.NET: When does GC run? Memory leak? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a[详细]
2023-04-07 00:25 分类:问答DDD: how to keep a complex value object immutable?
I\'d like to model an Address as a value object. As it is a good practice to make it immutable, I chose not to provide any setter, that might allow to modify it later.[详细]
2023-04-04 09:47 分类:问答Python: can I modify a Tuple?
I have a 2 D tuple (Actually I thought, it was a list.. but the error says its a tuple) But anyways..[详细]
2023-04-04 02:47 分类:问答Just realized IEnumerable<T> is immutable, what are other most commonly used immutable generic interfaces? MSDN doesn't say [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertis开发者_开发技巧e, but this question will likely so[详细]
2023-04-03 07:00 分类:问答Sending a ValueProxy for an immutable class upstream to server
Suppose I am trying to use GWT\'s RequestFactory to pass an immutable type between client and server, bidirectionally.Let\'s say the underlying type is TimeOfDay, which is designed to be immutable:[详细]
2023-04-03 04:33 分类:问答How to free, or recycle, a string in C#?
i have a large string (e.g. 20MB). i am now parsing this string. The problem is that strings in C# are immutable; this means that once i\'ve created a substring, and looked at it, the memory is wast开[详细]
2023-04-02 17:13 分类:问答Functional Queue From Programming In Scala
I\'m going through Programming In Scala 2nd Edition by Odersky, Spoon, and Venners, and this example threw me for a loop since it seemed to go against what I thought was true about functional programm[详细]
2023-04-01 23:08 分类:问答