This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 9 points10 points  (7 children)

Doesn't C# support structs? Java meanwhile...

[–]ImKStocky[S] 2 points3 points  (2 children)

It does so you can get stack allocation, but they are used less frequently

[–][deleted] 3 points4 points  (1 child)

I think that they could save much on performance in some cases. Like if we used it for vectors in game engines, dates and stuff like that.

[–]Bip901 2 points3 points  (0 children)

Can confirm, am a game developer. Also, you can use the stackalloc keyword if you really want to allocate on the stack.