Re:Godot 4.0 development enters feature freeze ahead of the ...
by steeleduncan on Thursday July 28, 2022 @11:43AM
(#32265890)
gdscript is dynamically typed. If you have the large arrays of structs common in gamedev, then all data members are boxed, significantly increasing memory usage compared to something like C#.
[ Parent
| on HN ]
Re:Godot 4.0 development enters feature freeze ahead of the ...
by unsafecast on Thursday July 28, 2022 @02:05PM
(#32268059)
C# objects are boxed too.
Re:Godot 4.0 development enters feature freeze ahead of the ...
by jbluepolarbear on Thursday July 28, 2022 @10:40PM
(#32272580)
Boxing is taking a Value Type (struct, int, enum, etc) and converting it to an Object. So Objects aren’t boxed.
Re:Godot 4.0 development enters feature freeze ahead of the ...
by unsafecast on Friday July 29, 2022 @02:52AM
(#32273855)
Apparently we have different definitions of boxing. To me, and I've always used it (and seen it used) like this, a boxed value is a value that's stored on the heap and passed as a pointer. Maybe C# has a different definition?
Re:Godot 4.0 development enters feature freeze ahead of the ...
by steeleduncan on Friday July 29, 2022 @07:38AM
(#32275682)
No, from the C# docs[1] - Boxing is the process of converting a value type to the type object or to any interface type implemented by this value type
[1] https://docs.microsoft.com/en-us/dotnet/csharp/programming-g...
Re:Godot 4.0 development enters feature freeze ahead of the ...
by unsafecast on Friday July 29, 2022 @07:50AM
(#32275772)
Right, so then in C# a boxed value is an object as far as I can tell.
Re:Godot 4.0 development enters feature freeze ahead of the ...
by jbluepolarbear on Friday July 29, 2022 @09:56AM
(#32276925)
That’s correct, but not what you said. You said objects are boxed. Values are boxed to create a reference by wrapping it in an object, objects are already reference types so there’s no boxing.
Re:Godot 4.0 development enters feature freeze ahead of the ...
by unsafecast on Friday July 29, 2022 @03:36PM
(#32280939)
I'm not extremely familiar with C# objects, but I think I get the confusion now. My point was that objects are boxed values, and that most things in C# are (to my knowledge) objects. I guess I used slightly the wrong words.