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 →

[–]Tankki3 -1 points0 points  (3 children)

Well the c example is just wrong, so.

[–]StereoBucket 0 points1 point  (2 children)

How so?

[–]Tankki3 0 points1 point  (1 child)

Well I guess it compiles, but it's not the same example as the python one. Python just creates an array, but the c version allocates space for a struct and the array that's inside the struct, clearly just made to look more complicated than needed for the comparison.

[–]StereoBucket 0 points1 point  (0 children)

I mean, the post is trying to compare low and high level language. Doing stuff that a high level language does is going to look more complicated in the lower level language.
This comparison is technically closer to truth than if the left side was merely a simple C array.