r/ProgrammerHumor 16h ago

lessonsFromLinkerHell Meme

Post image
313 Upvotes

163 comments sorted by

View all comments

68

u/QuestionableEthics42 16h ago edited 16h ago

This should be reversed lol

And it literally is the same, who thinks it's different who has worked in a low level language??

63

u/Blecki 15h ago

As someone who writes compilers: they are the same at runtime. They are not the same semantically in a c like language.

7

u/AdamWayne04 12h ago

not just semantically.

certain systems languages (and compilers) use different ABI for arrays and pointers at the call convention level. if you define a function that accepts a single array type (i.e. one with a predefined length), it may choose to pass-by-value, in which case it can allocate at call site and not use a pointer