Crater
Crater
Explore posts from servers
CC#
Created by Crater on 1/3/2025 in #help
Mutable-by-copy pattern?
Kinda, yeah actually. I totally forgot with was a thing. I think its limitations and relatively small scope probably make it not totally useful for what I had in mind necessarily, but still interesting to think about in relation to the data. I guess the challenge with it is just that you don't get a truly mutable copy, you get a short window of mutability on a copy before it becomes read-only again. Granted in some scenarios that's enough, but it's basically just shorthand for feeding the data into its own constructor, I feel like. More elegant for short-term uses, but just as locked down I think. Cool reminder of a lesser-used keyword in any case though, and I'll probably find some use for it while working with this stuff.
13 replies
CC#
Created by Crater on 1/3/2025 in #help
Mutable-by-copy pattern?
Wouldn't this part still mean mutability on the object's fields? e.g.
public struct NewStruct
{
public readonly Thing NewThing; // previously ImmutableThing in the first snippet
}
public struct NewStruct
{
public readonly Thing NewThing; // previously ImmutableThing in the first snippet
}
would allow this kind of thing:
newStructVar.NewThing.Stuff[0] = 255;
newStructVar.NewThing.Stuff[0] = 255;
I think?
13 replies
DHDistant Horizons
Created by Crater on 9/21/2024 in #help-me
(SOLVED) Odd LOD generation in Aether dimension (not multiplayer!)
yeah, that's understandable. the aether is definitely an odd case (especially since much of its world is Y < 60) so it makes sense that it ends up with strange behavior on default settings. thanks again, in any case
10 replies
DHDistant Horizons
Created by Crater on 9/21/2024 in #help-me
(SOLVED) Odd LOD generation in Aether dimension (not multiplayer!)
ah, it was cave culling, thanks. didn't even think about that being a culprit, assumed DH used something other than just Y level to determine what is/isn't a "cave" but that makes sense!
10 replies