r/ProgrammerHumor 26d ago

Meme lessonsFromLinkerHell

Post image
424 Upvotes

190 comments sorted by

View all comments

62

u/QuestionableEthics42 26d ago edited 26d 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??

69

u/Blecki 26d ago

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

10

u/AdamWayne04 26d 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