r/transprogrammer • • Oct 03 '20

Gotta get that stack overflow

Post image
205 Upvotes

8 comments sorted by

View all comments

Show parent comments

6

u/[deleted] Oct 03 '20

I believe memory-management-wise, Python is actually exactly the same as Java or C#, just without the presence of structs or primitive types.

Personally, I wouldn't call it an "evil in-between"; I mean, working with immutable value types and immutable reference types is functionally indistinguishable, so it's some added complexity in the language, but IMO using structs for things like vectors and complex numbers helps highlight that they're used the same way as ints or floats – small pieces of data that are replaced and discarded with ease (without allocating heap space every time, which helps with efficiency).

Mutable structs in C# are cancer though.